I think female is 2 in the database, and no answer is 0. I’ve definitely got that value working from a Login form.
Not entirely sure I follow what you want to do with your first post.
Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
The placeholder is only used for output.
When you create the form with a field that isn’t in the user table by default, Revo stores the value as a name-value pair in a JSON-encoded variable called ’extended fields’. If you just let Register snippet work normally, it will create that field WITHIN extended_fields (so it’s not immediately available on output - you need to deserialise it).
On the user interface (Manage Users > Select a user > Update user) it’s the fourth tab along = ’Extended fields’
Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
Hi odeclas,
we want to ask in the registration-process:
What are your favorite colors?
For the answer we want to offer these colors: red, blue, white, green and yellow.
A user should be able to choose more than one color resulting for example in a list like this: "green,blue,red" which should be stored in the placeholder [[+color]]
I am not sure if this is possible. Does anybody knows this?
Terminology is important - you don’t store variables in a placeholder. I think you mean you want a single field to store the answer, regardless of how many colors are selected? ie colors=’Red’ or colors=’Red, Blue, Green’.
You might want to look at the FormIt checkbox handling tutorial for some ideas:
http://rtfm.modx.com/display/ADDON/FormIt.Handling+Selects%2C+Checkboxes+and+Radios
Login and FormIt handle validation differently, but they both handle things in a similar way. If the output is not how you like it from the form, you can use a &hook (&posthook I think it is in Login) that could cocatenate the variables together into a single answer. If you use a hook, all the variables are available via $hook->get(’foo’); which gets round your earlier issue.
Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86