Announcement

Collapse
No announcement yet.

Can I put a button on the MOTO form that will put the shop address into the...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can I put a button on the MOTO form that will put the shop address into the...

    Can I put a button on the MOTO form that will put the shop address into the 'Delivery Contact' fields for people collecting from the shop?

    You can do this by doing the following:

    * go to the 'Design' menu and select 'Library'

    * on the 'Layouts' tab, expand the 'MOTO Form' group (click on the '+')

    * double-click on the 'Standard MOTO Form' layout to edit it

    * add the following code above the '</head>' tag:

    <script language="javascript" type="text/javascript" >
    function OnCopyShopAddress()
    {

    document.all.DELIVERCOMPANY.value = "Shop Name";
    document.all.DELIVERADDRESS1.value = "Shop Address Line 1";
    document.all.DELIVERADDRESS2.value = "Shop Address Line 2";
    document.all.DELIVERADDRESS3.value = "Town";
    document.all.DELIVERADDRESS4.value = "County";
    document.all.DELIVERPOSTALCODE.value = "Postcode";
    document.all.DELIVERPHONE.value = "Phone number";
    document.all.DELIVEREMAIL.value = "myaddress@domain.co.uk";
    }
    </script>

    * change the values in the above to your shop details (if you do not show the 'Company Field' then you may want to use 'DELIVERADDRESS1' for shop name and remove the line for 'DELIVERCOMPANY')

    * then search for:

    <h2>Delivery Contact:</h2>

    and you should see:



    * add the following directly before the '<p>' tag:

    <button id="CopyShopAddress" type="button" onclick="OnCopyShopAddress()">Copy Shop Address</button>

    * click 'Apply'

    * switch to your 'New Order' tab to test it out (you may have to click 'Reset' at the bottom of the screen to apply the new option).
    Attached Files
Working...
X