Hi Yuniar,
It seems the first address field is not checked? I do not care about the 2nd address field, but the first one is important.
Please advice on how to enable the check on 1st address field. TY
Hi Yuniar,
It seems the first address field is not checked? I do not care about the 2nd address field, but the first one is important.
Please advice on how to enable the check on 1st address field. TY
I tried several things, but it just ignores to check the streetname.... :(
Zip code, etc. it checks fine...
Please advice...
Hmm.. what do you mean by the first address field is not checked? What checking?
I mean the the check if the addres is filled in or if it's empty... :S
I don't believe that Machform is designed to work the way you're thinking.
The validation is not that specific as to give a message saying for example: "You haven't filled in the postcode field, please try again".
It seems to be more general as in: "The address details are incomplete; please complete them before continuing".
Hmm.. I think you both are correct.
The validation for address field is not that specific for each field. It's more general indeed, as "the address details are incomplete".
However, the first address field should be checked for its value (empty or not), and not the second address field.
To fix this issue, edit your includes/post-functions.php file.
Search around line 461 - 474:
if($element_info[$element_id]['is_required']){
$rules[$element_name_3]['required'] = true;
$rules[$element_name_4]['required'] = true;
$rules[$element_name_5]['required'] = true;
$rules[$element_name_6]['required'] = true;
}
$target_input[$element_name_3] = $user_input[$element_name_3];
$target_input[$element_name_4] = $user_input[$element_name_4];
$target_input[$element_name_5] = $user_input[$element_name_5];
$target_input[$element_name_6] = $user_input[$element_name_6];
change the above block of code to be like this:
if($element_info[$element_id]['is_required']){
$rules[$element_name]['required'] = true;
$rules[$element_name_3]['required'] = true;
$rules[$element_name_4]['required'] = true;
$rules[$element_name_5]['required'] = true;
$rules[$element_name_6]['required'] = true;
}
$target_input[$element_name] = $user_input[$element_name];
$target_input[$element_name_3] = $user_input[$element_name_3];
$target_input[$element_name_4] = $user_input[$element_name_4];
$target_input[$element_name_5] = $user_input[$element_name_5];
$target_input[$element_name_6] = $user_input[$element_name_6];
That should fix it.
Okay I did exactly what you said (I removed the old part and replaced it with the new lines), but now it stays red (as if the fields are not filled in at all)!
No matter if they fill in the required field, the check continues to say it's not filled in... Arghh....
Hmm.. that's odd. I've tested it and it should be working.
Can you send me your file please?
Mail to: customer.service [at] appnitro.com
Fixed thanks to Yuniar! :D
You must log in to post.