I forgot:

For the validation you can use:

ValidationBuilder v = f.getValidationBuilder();

and then the methods:
generateValidationErrors
generateErrorMarkings

I'm working on a survey-type site where the number of questions that will appear on a form are arbitrary. I've therefore started using dynamic submissions to get the results back from the form.

That all works great (including the maths captcha), but where it falls down is for validation.

It seems that if I'm not using a bean to model the form data, I can't generate the form, and can't take advantage of the nice validation and error markup functionality that RIFE has to offer.

This leaves me with a page saying "You've missed a bit, hit back on your browser to complete the form"... *shudder*

You should be able to get the form builder through:
FormBuilder f = template.getBeanHandler().getFormBuilder();

and then use the generateField method to generate a field dynamically.

--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com


_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to