-
AuthorPosts
-
May 24, 2017 at 5:04 pm #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” 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.
.Do you have an idea how to enter a custom form?
May 25, 2017 at 6:24 am #799373Hey 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,
RikardMay 31, 2017 at 11:17 am #801944Thank you for replying!
I have posted temp login details in private.
June 1, 2017 at 5:07 pm #802660Hi 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,
VictoriaJune 2, 2017 at 1:20 pm #802996Hi Victoria,
I have enabled the Avia Layout Builder debugger. I have allso entered the code for the Insightly form.Best
TanjaJune 6, 2017 at 1:32 pm #804498Is there anything else that you need from me?
June 7, 2017 at 2:54 am #804779Hi,
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,
IsmaelJune 7, 2017 at 11:16 am #805019Thank 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.
June 7, 2017 at 5:23 pm #805192The 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?
June 9, 2017 at 8:44 am #805909Hi,
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,
IsmaelJune 13, 2017 at 11:25 am #807371Hi 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
TanjaJune 14, 2017 at 5:17 am #807762Hi,
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,
RikardJune 14, 2017 at 12:38 pm #807930Ok, thank you. It works perfectly thank you :-)
May I ask what the reason was that the regular html for broke the Avia builder?June 15, 2017 at 4:34 am #808383 -
AuthorPosts
- You must be logged in to reply to this topic.