Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    You have this button element between Postcode and Address.

    <button type="button" onclick="cp_obj.doLookup()" class="lookup">FIND ADDRESS &raquo;</button>

    What is this and how have you put this into the form? Seemingly this is the direct cause of the issue.

    Thread Starter Newman81

    (@newman81)

    Hi,

    Thanks for your response, that section is to tie the form in with a ‘postcode lookup’ function, which was working.

    To get it working with contact-form-7 I added the following code to some Javascript as described here: https://craftyclicks.co.uk/tutorials/postcode-lookup-in-15-minutes/

    var cp_obj = CraftyPostcodeCreate();
       cp_obj.set("access_token", "xXXXXx"); // your token here
       cp_obj.set("result_elem_id", "crafty_postcode_result_display");
       /*cp_obj.set("form", "wpcf7-form");*/
       cp_obj.set("elem_company"  , "companyname");
       cp_obj.set("elem_street1"  , "address1");
       cp_obj.set("elem_street2"  , "address2");
       cp_obj.set("elem_street3"  , "address3");
       cp_obj.set("elem_town"     , "town");
       cp_obj.set("elem_postcode" , "postcode");
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Form not submitting – uncaught error?’ is closed to new replies.