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

Change the titles of address form


  1. whdsolutions
    Member

    As we are in the UK we don't use labels such as:

    State / Province / Region >> We use County

    Zip Code >> We use Postcode

    Also as we only cater for the UK, is there a way I can remove the Country Selector form the form?

    http://www.headstartprimary.com/14-day-trial/

    How can these be changed?

    Posted 10 years ago #
  2. whdsolutions
    Member

    Any ideas???

    Posted 10 years ago #
  3. anujagrawal
    Member

    Hi whdsolutions - at the risk of invoking the wrath of the MachForm developers, here's the easiest way i think you can do this. Please note that you run the risk of messing things up royally if you don't follow the instructions exactly.

    1. Make a backup copy of language.php in the includes directory. You will be modifying the original, so you need the backup in case something goes wrong.

    2. Make a backup copy of view-functions.php in the includes directory. You will be modifying the original, so you need the backup in case something goes wrong.

    3. In language.php, look on lines 23 and 24, if you have MachForm v4, you should see something like:

    $mf_lang['address_state']		=	'State / Province / Region';
     $mf_lang['address_zip']			=	'Postal / Zip Code';

    Change the appropriate values to 'County' and 'Postcode'.
    That should take care of your label issue.

    4. In view-functions.php, search for function mf_get_country_list. You will want to comment out all the countries except for United Kingdom, and then change the array value to 0 (you should only find 2 entries for United Kingdom, and the array value is 1 which you should change to 0).

    That's it.
    Good luck.

    Posted 10 years ago #
  4. williamansley
    Member

    @anujagrawal: Thanks for sharing this!

    @whdsolutions: You don't need to worry about the wrath of the developers; when you buy Machform, you are given a license to modify the source code as you see fit. But there are two things you need to be aware of, if you want to try this solution to your problem:

    1. If you ever upgrade Machform, the new files will wipe out your customized ones, and you will need to redo the changes you have made in the corresponding files in the new version. This code you need to edit may be different and in a different location in the file. (If the upgrade is really major, the code may even have been moved to a different file, or the change you want to make may no longer be possible. This is unlikely, however.)
    2. Appnitro will not be able to provide support for any problems that arise in your Machform installation due the the changes you have made to their code.
    Posted 10 years ago #
  5. whdsolutions
    Member

    The function mf_get_country_list worked but the changes to:

    $mf_lang['address_state'] = 'County';
    $mf_lang['address_zip'] = 'Post Code';

    These changes haven't worked!!!

    Posted 10 years ago #
  6. williamansley
    Member

    @whdsolutions: It looks as if anujagrawal missed something. Look in the language.php file around lines 210 and 211 and you should see this:

    $languages['address_state']			= 'State / Province / Region';
    			$languages['address_zip']			= 'Postal / Zip Code';

    Change these lines to 'County' and 'Postcode' as well, and hopefully that will do the trick. Good luck!

    Posted 10 years ago #

RSS feed for this topic

Reply