-
loadFormField
Hello,
I am developping specific hooks in order to manage the field contents of a form
loadFormField : for initialising the contents
validateFormField : for validating the contents
When the form is displayed : only the first hook is activated, that' good
when the form is submitted : the two hooks are activated : the validate one and the load one
I don't understand at all why the loadFormField hook is activated ?
Could you help
Thanks
-
Re: loadFormField
because the form is displayed again after submission...
-
Re: loadFormField
Thyon ,
ah Ok ,
thank you for your answer,
but :
How to distinguish the first passage and the second one :
1) one treatment when the form is displayed
2) another treatment when the form is validaded (or : how to distinguish the passage order in the loadFormField hook ?
regards,
-
Re: loadFormField
load is first as far as I know, look in the widget control for the hook. Load is the loading of the control, as you can manipulate the select contents dynamically or do this kind of stuff, that has to happen first, then the control is submitted and then validated... normally you don't to validation in the load form field. you might change options based on others... I used it to add dynamic labels to each option, e.g. add how many free seats there are for an option... (formauto extension, where I requested the original hooks to be added)