Community Forums 

Main Content

re-naming checkout fields

    Dec 10 2014 01:51:40

    #1

    thekiteman

    Join date : 2008-11-02      Posts : 15

    I've followed a previous forum at https://www.mals-e.com/viewtopic.php?id=10585&mid=10585&fid=2
    to work out how to change the name of one of the address fields (Company to Your Business Name....don't ask!) but now I'd like to know the script for adding a second change. I've tried all the cut-n-paste options I can come up with but it either blanks out the whole page or makes no change at all. This is what I've got so far.... <script>function x(){document.body.innerHTML=document.body.innerHTML.replace(/Company/gi,"Business Name");}onload=x;
    </script>
    What line do I add to also change 'City' to 'Suburb and City'?
    Thanks



    Dec 11 2014 21:53:27

    #2

    Geoff

    Join date : 2008-09-18      Posts : 415

    Simply add further statements inside the function, for example

    <script>function x(){document.body.innerHTML=document.body.innerHTML.replace(/Company/gi,"Business Name");document.body.innerHTML=document.body.innerHTML.replace(/City/gi,"Suburb and City");}onload=x;</script>

    Note that each statement is separated by a semicolon.

    Be aware that there is a character limit in the boxes where you are entering this script. Instructions to deal with this are in the original thread you found.