Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #799036

    Hi,
    We use Insightly CRM and they have a feature that lead generate directly from webpage to the CRM through a contact form.
    The HTML looks like this:
    <form name=”insightly_web_to_contact” action=”https://granturismo.insight.ly/WebToContact/Create&#8221; method=”post”><input type=”hidden” name=”formId” value=”+hi0WEFPxPsS455qxnGVOw==” /><label for=”insightly_firstName”>First Name: </label><input id=”insightly_firstName” name=”FirstName” type=”text”/><br/><label for=”insightly_lastName”>Last Name: </label><input id=”insightly_lastName” name=”LastName” type=”text”/><br/><label for=”insightly_CONTACT_FIELD_9″>E-mail </label><input id=”insightly_CONTACT_FIELD_9″ name=”CONTACT_FIELD_9″ type=”text” /><br/><label for=”insightly_CONTACT_FIELD_10″>Link til bil på mobile.de eller bilbasen.dk </label><input id=”insightly_CONTACT_FIELD_10″ name=”CONTACT_FIELD_10″ type=”text” /><br/><label for=”insightly_CONTACT_FIELD_11″>Modelbeskrivelse </label><textarea id=”insightly_CONTACT_FIELD_11″ name=”CONTACT_FIELD_11″></textarea><br/><input type=”submit” value=”Submit”></form>

    When I try to enter that in either a text field or a code block, it messes the backend up.
    the broken page when entering the custom form.

    Do you have an idea how to enter a custom form?

    #799373

    Hey Tanja,

    Please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Best regards,
    Rikard

    #801944

    Thank you for replying!

    I have posted temp login details in private.

    #802660

    Hi Tanja Kreutzfeld,

    Could you please enable Advanced Layout Builder debug mode.

    I moved the text and the code block to the right, but the form disappeared.

    Best regards,
    Victoria

    #802996

    Hi Victoria,
    I have enabled the Avia Layout Builder debugger. I have allso entered the code for the Insightly form.

    Best
    Tanja

    #804498

    Is there anything else that you need from me?

    #804779

    Hi,

    Thank you for the update.

    We created a test page and added the form in a code block element. It is working as expected.

    Best regards,
    Ismael

    #805019

    Thank you, but something is still not right. First of the formcode was OUTSIDE the code block element. Second, when I tried to drag it over in a column, it disappeared.

    #805192

    The form code is still messing up the builder. Is there a way to avoid that? It’s a simple html form, it should not be a problem?

    #805909

    Hi,

    I see. Please remove the contact form code in the code block then replace it with the following html.

    
    <div id="insightly_form1"></div>
    

    Add this code in the functions.php file:

    // insightly form
    function ava_custom_script_insightly_form(){
    ?>
    <script>
    (function($){
    	function b() {
    			var output = '';
    
    			output += '<form name="insightly_web_to_contact" action="https://granturismo.insight.ly/WebToContact/Create" method="post"><input type="hidden" name="formId" value="+hi0WEFPxPsS455qxnGVOw==">';
    			output += '<label for="insightly_firstName">First Name: </label>';
    			output += '<input id="insightly_firstName" name="FirstName" type="text"/><br/>';
    			output += '<label for="insightly_lastName">Last Name: </label>';
    			output += '<input id="insightly_lastName" name="LastName" type="text"/><br/>';
    			output += '<label for="insightly_emailAddress">Email Address: </label>';
    			output += '<input id="insightly_emailAddress" name="EmailAddress" type="text"/><br/>';
    			output += '<input type="hidden" name="phones[0].Label" value="Work"/>';
    			output += '<label for="phones[0]_Value">Phone: </label>';
    			output += '<input id="phones[0]_Value" name="phones[0].Value" type="text"/><br/>';
    			output += '<label for="insightly_CONTACT_FIELD_10">Link til bil på mobile.de eller bilbasen.dk</label>';
    			output += '<input id="insightly_CONTACT_FIELD_10" name="CONTACT_FIELD_10" type="text" /><br/>';
    			output += '<label for="insightly_CONTACT_FIELD_11">Modelbeskrivelse </label>';
    			output += '<textarea id="insightly_CONTACT_FIELD_11" name="CONTACT_FIELD_11"></textarea><br/>';
    			output += '<input type="submit" value="Submit"/>';
    			output += '</form>';
    
    			$('#insightly_form1').append(output);
    	}
    
    	b();
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'ava_custom_script_insightly_form');

    Best regards,
    Ismael

    #807371

    Hi Ismael, Thank you for the reply.
    It is a bit complicated to understand, so I needed a little time, but it makes sense now :-) One thing though – I have read something about not having more that one <?php tag in the functions.php? Do I need to remove something from your code then?

    Thank you
    Tanja

    #807762

    Hi,

    You can have as many of those as you like, that is the start declaration of a PHP block of code. Just make sure that you close it properly:

    ?>

    If everything works as you want you don’t need to change anything though.

    Best regards,
    Rikard

    #807930

    Ok, thank you. It works perfectly thank you :-)
    May I ask what the reason was that the regular html for broke the Avia builder?

    #808383

    Hi,

    Some markup can break the builder unfortunately, so Ismael added it via a function instead which is separate from the builder.

    Best regards,
    Rikard

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.