<p>You can't.</p>

<p>The Craft / Twig code runs server-side, before the page is delivered to the browser. The JavaScript runs client side, after the page is delivered to the browser.</p>

CC BY-SA 3.0
2017-03-07T18:59:40.380Z
2017-03-07T18:59:40.380Z
Stephen Lewis
<p>This might be a stretch.  </p>

<p>How do I (literally) modify the (Tableau API) javascript function below to print a specific fieldName ("Country") so that it can place the "Country" into the CraftCMS/Twig request below?</p>

<p>{% set results = craft.entries.section('posts').search('countryName:"<strong>Value Goes Here</strong>"') %}</p>

<p><a href="https://i.sstatic.net/l3ONW.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/l3ONW.png" alt="enter image description here"></a></p>

CC BY-SA 3.0
2017-03-07T08:01:42.223Z
You can't. The Craft / Twig code runs server-side, _before_ the page is delivered to the browser. The JavaScript runs client side, _after_ the page is delivered to the browser.
Stephen Lewis
CC BY-SA 3.0
2017-03-07T18:51:43.063Z
Can you provide that as an answer so you can get credit.
Hellyar
<templating>
How do I add input a value to a Craft/Twig request?
# How do I add input a value to a Craft/Twig request?

(Asked by: username_0 on 2017-03-06)

This might be a stretch.

How do I (literally) modify the (Tableau API) javascript function below to print a specific fieldName ("Country") so that it can place the "Country" into the CraftCMS/Twig request below?

{% set results = craft.entries.section('posts').search('countryName:"**Value Goes Here**"') %}

[![enter image description here](https://i.sstatic.net/l3ONW.png)](https://i.sstatic.net/l3ONW.png)

**Tags:** templating
> **Comments:**
> **username_1**: You can't. The Craft / Twig code runs server-side, _before_ the page is delivered to the browser. The JavaScript runs client side, _after_ the page is delivered to the browser.  
> **username_0**: Can you provide that as an answer so you can get credit.  

---

## 1 answers

### Answer by username_1 on 2017-03-07. Score: 1 | Accepted answer

You can't.

The Craft / Twig code runs server-side, before the page is delivered to the browser. The JavaScript runs client side, after the page is delivered to the browser.


---

