Page 1 of 1
Re: Formbuilder validation messages
Posted: Tue Jul 29, 2008 10:54 am
by irish
On your PHP page that calls this template, do a print_r on $fb_form_validation_errors. Then submit the form again with errors and print_r will display all the keys and values of the validation_errors.
Code: Select all
print_r($fb_form_validation_errors);
Re: Formbuilder validation messages
Posted: Tue Jul 29, 2008 2:29 pm
by irish
Nonus,
You will need to put that in the action.default.php page. around line 52 put this:
Of course, you want to do this in your test environment.
Re: Formbuilder validation messages
Posted: Tue Jul 29, 2008 4:31 pm
by irish
It looks like the array doesn't contain the information you want. It only contains the message. You have two choices now
1) Start hacking the formbuilder module so that it will pass the field labels separately. NOTE: you will need to have a good understanding of PHP to do this.
2) On the action.default.php parse out the field labels in the values of the $res[1] array. e.g. parse "Name" from 'Please enter a value for "Name" '
p.s. are you only doing this so that you can have the error message display in another language? if so, formbuilder comes with many build in languages.
Re: Formbuilder validation messages
Posted: Tue Jul 29, 2008 7:05 pm
by Dr.CSS
How do you mean validate?...
When you make the form you can use 2 one for each language, like this site, test site so you can play,
http://www.223isp.net/index.php?page=co ... s&hl=en_US
You have to make sure you generate the forms after adding all the fields...
Re: Formbuilder validation messages language
Posted: Wed Jul 30, 2008 9:32 am
by Dr.CSS
If you look at the page/tab, when editing the form, that has the form, generate form or some such wording it has all the fields the form will generate...