
Nikos - 2008-07-14 07:38:37 -
In reply to message 2 from Manuel Lemos
--Currently generating inputs dynamically via Javascript is not possible but --I have plans to do it. I just have not figured a good solution to --implement that. I am open to suggestions.
Generating inputs dynamically via Javascript is a rare occurrence, only needed in the most complicated of situations. The difficulty would be to get your class to generate the necessary Javascript so that when extra inputs are generated they are validated by Javascript to. You would have to create a new type of input in your class that does this I think. I think this would be much easier if the new inputs were a twin (same name) of some other input in the form.
--As for server side validation of extra inputs, if you have a condition --in your PHP script that checks something that determines that a dynamic --input was added on the browser side, you can add that input on the --server side and validate it when the form is submit via AJAX or not.
Again this would be easier if the inputs were of the same name and then the length of the post array for that name could be used in the validation, probably by my custome code in the
if(doit){
}
part of your code.