How to read variables on a page

New Member
16 0 0

I'm trying to pass some variables in a script in a page template but instead of getting the variable value I get the variable parsed as text.

 

{% include 'breadcrumb' %}

<div class="grid">

<div class="grid-item large--two-thirds push--large--one-sixth">

<h1>{{ page.title }}</h1>
<script type="text/javascript" src="//form.jotform.us/jsform/xyz?name={{ customer.first_name }}&email9={{ customer.email }}"></script>
<div class="rte">


{% if customer %} , {{ customer.first_name }} {{ customer.email }}. {% endif %}
{{ page.content }}
</div>

</div>

</div>

 

The non script section works ok, but the form created shows {{ customer.first_name }} rather than the variable value.

 

Any thoughts appreciated.

0 Likes

Hi

It seems there are some other issue on your site.
You have define the variable in the correct way in script tag.
If you can share the link your you were getting it wrong. I can check further.

0 Likes
Highlighted
New Member
16 0 0

Hi and thank you. We haven't implemented this yet, still testing on a dev site. The code above works outside of the script tags, just not inside.

0 Likes