This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 3
Removal or Hiding of : State / Province / Region and Country
Started 12 years ago by Lokidog | 3 posts |
-
I have seen a few post about this in the forums but none seem to give a clear explanation of how this is possible.
I Sweden our address's are very short ie:
Sånga-säbyvägen 35
Svartsjö
17996When making the address field "Required" it makes the user confused as to what write in the State / Province / Region when it returns "Incomplete"
For my part it would be great if you could choose what elements (On & Off) appear in the address field for each form as we have international clients as well.Posted 12 years ago # -
Thank you for your feedback on this. It is possible to remove the validation to the "State/Province/Region" field when the address field is being set as Required.
To do this, you can edit your "includes/post-functions.php" file, search around line 858:
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; }
change it to become:
if($element_info[$element_id]['is_required']){ $rules[$element_name]['required'] = true; $rules[$element_name_3]['required'] = true; $rules[$element_name_5]['required'] = true; $rules[$element_name_6]['required'] = true; }
this way, the user will be able to leave the state field empty.
MachForm Founder
Posted 12 years ago # -
Would it be possible to change the adressfield like this:
- adress and number
- postal code
- city
- country ?This is the normal way of filling in forms in the European Union.
Posted 11 years ago #
Reply
You must log in to post.