RejectedSoftware Forums

Sign up

Does a name helper for loadFormData() exist?

Hello!

I've just noticed this exists and find it immensely useful.

Do helpers exist to create proper name="..." HTML attributes? I can't seem to find them. (For the underscore delimiters and such.) Or am I supposed to use something like .stringof and then replace "." with "_"?

Re: Does a name helper for loadFormData() exist?

Am 10.02.2013 16:30, schrieb Matej Nanut:

Hello!

I've just noticed this exists and find it immensely useful.

Do helpers exist to create proper name="..." HTML attributes? I can't seem to find them. (For the
underscore delimiters and such.) Or am I supposed to use something like .stringof and then replace
"." with "_"?

I think it has to be done by hand, I didn't see a helper. All the form interface stuff is
contributed by Robert Klotzner by the way, so maybe he knows more. In general nested field names are
separated by underscores and array indices are directly appended to the field name for array fields.

If you have some time, it would be good if you could add a short issue on the github issue tracker
for this so it doesn't get lost. It sounds like a useful addition, especially should the format ever
be extended or altered in other ways.

A similar (or extended) idea to a name helper would be to provide Diet template includes to generate
the whole HTML form. D's new user defined attributes could be used to customize the output.