My audience is the UK and out addresses are different from those in the US.
I modify the code to give a UK address format, and I have to perform the mod each time Machform is upgraded.
The procedure must be done before importing any forms, otherwise, the address fields are missing.
The mod procedure is as follows:
edit includes/language.php file and go to around line 19 and 25,
Find:
//address
$mf_lang['address_street'] = 'Street Address';
$mf_lang['address_street2'] = 'Address Line 2';
$mf_lang['address_city'] = 'City';
$mf_lang['address_state'] = 'State / Province / Region';
$mf_lang['address_zip'] = 'Postal / Zip Code';
$mf_lang['address_country'] = 'Country';
Change to:
//address
$mf_lang['address_street'] = 'Address Line 1';
$mf_lang['address_street2'] = 'Address Line 2'; // not used - disabled in Machform
$mf_lang['address_city'] = 'Address Line 2';
$mf_lang['address_state'] = 'Address Line 3';
$mf_lang['address_zip'] = 'Postcode';
$mf_lang['address_country'] = 'Country'; // not used, disabled in includes/view-functions.php
Note: Two Address LIne 2’s - one is hidden in Machforms checkbox “Hide Address Line 2”.
Find
//address
$languages['address_street'] = 'Street Address';
$languages['address_street2'] = 'Address Line 2';
$languages['address_city'] = 'City';
$languages['address_state'] = 'State / Province / Region';
$languages['address_zip'] = 'Postal / Zip Code';
$languages['address_country'] = 'Country';
Change to
//address
$languages['address_street'] = 'Address Line 1';
$languages['address_street2'] = 'Address Line 2';
$languages['address_city'] = 'Address Line 2';
$languages['address_state'] = 'Address Line 3';
$languages['address_zip'] = 'Postcode';
$languages['address_country'] = 'Country';
Find
$mf_lang['error_title'] = 'There was a problem with your submission.';
Change to
$mf_lang['error_title'] = 'There was a problem with your instructions.';
Find
//form status
$mf_lang['form_inactive'] = 'This form is currently inactive.';
$mf_lang['form_limited'] = 'Sorry, but this form is no longer accepting any entries.';
Change to
//form status
$mf_lang['form_inactive'] = 'We are currently offline for maintenance.';
$mf_lang['form_limited'] = 'Back in an hour or so - Jason Bennison - Technical Support.';
To hide the country dropdown field, open includes/view-functions.php file.
Find:
<span id="li{$element->id}span_6" class="right">
Change to :
<span id="li{$element->id}span_6" class="right" style="display:none !important;">
Open includes/post-functions.php
Find:
$rules[$element_name_6]['required'] = true;
Change to
//$rules[$element_name_6]['required'] = true;