[development] form protection?
Yves CHEDEMOIS
yched.drupal at free.fr
Fri Dec 28 13:26:25 UTC 2007
Alessandro Feijó a écrit :
> I'm manipulating dynamicaly the content of a Combobox
>
> It starts empty, I set the values with jQuery, and when I click
> Submit, an error say something like 'invalid content, contact your
> administrator'
>
> There is any protection to prevent content different from the
> original possible values to an <SELECT> ?
Yes there is.
You need to specify
$form['your_select_element']['#dangerous_skip_check'] = TRUE;
You probably then need to perform your own server-side validation on the
posted value.
Note that this has been removed from D6, where the recommended way is
now to use FAPIs #ahah properties.
More information about the development
mailing list