Hi, big fan of umbraco - been xslt'ing for about 3 months now.
I'm thinking of getting Contour today, but for my current project I have a requirement I'm not sure if Contour can accommodate:
I need to implement forms with infinite fields. By that I mean a form where an end user filling in such a form would have the ability to add more fields if he/she has more information to add.
Something like this:
Education: --------------------
[add more]
and the "add more" button adds a new Education field.
I have no problem hardcoding such a form, but the client I'm developing for wants to have this functionality in user created forms as well.
Contour is a great solution for allowing cms users to add new forms, but it would be even better if there is support for infinite fields.
It should be possible to create a custom fieldtype that has this behaviour.
So a textbox with an 'add more' option that would add additional textboxes. The value of that field would then be stored as a comma seperated list of the different entries.
To get started you can find the sourcecode off all default Contour components (including field types) here:
Thanks for the tip Tim, but what if the user entered a comma? that... could pose a problem!
I'm thinking of trying a simplified approach where a maximum of 5 fields can be added, and then fill in the 6 table fields. Can a data type have multiple table fields?
On a tangent: are there measures implemented into contour to prevent sql injection?
You could use something pretty unlikely to see real world use, such as ~, to make it even less likely to conflict, double, or triple it up, ie ~~ or ~~~
Contour question: infinite fields ..?
Hi, big fan of umbraco - been xslt'ing for about 3 months now.
I'm thinking of getting Contour today, but for my current project I have a requirement I'm not sure if Contour can accommodate:
I need to implement forms with infinite fields. By that I mean a form where an end user filling in such a form would have the ability to add more fields if he/she has more information to add.
Something like this:
Education: --------------------
[add more]
and the "add more" button adds a new Education field.
I have no problem hardcoding such a form, but the client I'm developing for wants to have this functionality in user created forms as well.
Contour is a great solution for allowing cms users to add new forms, but it would be even better if there is support for infinite fields.
Comment author was deleted
Hi Mo,
It should be possible to create a custom fieldtype that has this behaviour.
So a textbox with an 'add more' option that would add additional textboxes. The value of that field would then be stored as a comma seperated list of the different entries.
To get started you can find the sourcecode off all default Contour components (including field types) here:
http://our.umbraco.org/projects/umbraco-contour-shared-source
Thanks for the tip Tim, but what if the user entered a comma? that... could pose a problem!
I'm thinking of trying a simplified approach where a maximum of 5 fields can be added, and then fill in the 6 table fields. Can a data type have multiple table fields?
On a tangent: are there measures implemented into contour to prevent sql injection?
Hi Mo
A field can only have 1 table field, there are currently no way around this limitation, we are looking into a soluton.
Data operations follow the Microsoft Patterns and Practices guidelines to avoid injection.
/Per
what kind of separator caan I use that wouldn't conflict with commas, colons, semicolons or periods?
The data entered could have all these and I am trying to figure out a method where nothing gets corrupted.
You could use something pretty unlikely to see real world use, such as ~, to make it even less likely to conflict, double, or triple it up, ie ~~ or ~~~
is working on a reply...