• Resolved mehransaedi

    (@mehransaedi)


    When i create a page on word press and create custom form on the page after update the page some codes are shown on the page itself like this …

    form entity=”lead” mode=”create” required=[“lastname”, “emailaddress1”, “description”] %}
    
    here show the fields of form ...
    
    {% endform %}

    how to solve this ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author alexacrm

    (@alexacrm)

    @mehransaedi

    looks like malformed shortcode or twig. In addition, your double quotes are “smart” quotes “” while they all should be straight double quotes “”.

    If you’re using page builders some of them could be a bit inconsiderate and modify the content.

    Can you paste the full source of the page or at least the block you’re using?

    Thanks
    George

    Thread Starter mehransaedi

    (@mehransaedi)

    Hi, Thanks for your replay.

    still I’m not using page builder its wordpress itself, and this is my code.

    {% form entity=”lead” mode=”create” required=[“lastname”, “emailaddress1”, “description”] %}
    <form method=”POST”>
    <input name=”firstname” required placeholder=”First Name”>
    <input name=”lastname” required placeholder=”Last Name”>
    <input name=”mobilephone” type=”tel” placeholder=”Phone Number”>

    <textarea name=”description” rows=”4″ placeholder=”Share Your Story”></textarea>

    <button type=”submit”>Submit</button>
    <input type=”hidden” name=”_key” value=”{{form.key}}”>
    </form>
    {% endform %}

    Thread Starter mehransaedi

    (@mehransaedi)

    wish i could post picture here.

    first line of code and the last line of code are shown in the page in the wordpress.

    actually the quotes are straight double quotes, i copied the code from the page itself thats why the quotes are NOT straight double quotes. So I’m sure they are correct.

    • This reply was modified 2 years, 9 months ago by mehransaedi.
    Plugin Author alexacrm

    (@alexacrm)

    @mehransaedi
    I don’t see twig shortcode in your code as per documentation. Without it, twig is not processed. Also, your double-quotes are “smart” curly ones while you need to use the straight ones “” for attribute values.

    Also, if you’re not on-premises and using custom form we strongly recommend using new Dataverse Integration plugin instead.

    Thanks

    Thread Starter mehransaedi

    (@mehransaedi)

    im using On-premise version of CRM, i want to use custom form not twig shortcode,
    with twig shortcode i dont have problem with form, the problem is when i use custom form,
    checked many times my quotes are straight double quotes not curly one after update the page they convert to curly ones.

    Plugin Author alexacrm

    (@alexacrm)

    In that case it looks like your WordPress editor changes the content (encoding or stripping html inside the form tag) before saving it. Try using shortcode block or custom html block instead of a standard content block – these tend to be left along by WordPress

    Thread Starter mehransaedi

    (@mehransaedi)

    Ok, Thanks.

    How to use Custom HTML form that works with CRM what code should i use?
    For example this is html form what changes should i do to this form ?

    <form action=”/action_page.php”>
    <label for=”fname”>First name:</label><br>
    <input type=”text” id=”fname” name=”fname” value=”John”><br>
    <label for=”lname”>Last name:</label><br>
    <input type=”text” id=”lname” name=”lname” value=”Doe”><br><br>
    <input type=”submit” value=”Submit”>
    </form>

    May you give me a example please?

    Plugin Author alexacrm

    (@alexacrm)

    Have you checked the documentation?

    Thread Starter mehransaedi

    (@mehransaedi)

    Thank you very much, the problem has been solved.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Some codes are shown on the page in wordpress’ is closed to new replies.