# Set search text box value programmatically

**URL:** <https://discuss.elastic.co/t/set-search-text-box-value-programmatically/171235>\
**Category:** Kibana\
**Created:** [March 7, 2019, 6:26am UTC](https://discuss.elastic.co/t/set-search-text-box-value-programmatically/171235 "2019-03-07T06:26:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![arjuncec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arjuncec/32/40593_2.png) [@arjuncec](https://discuss.elastic.co/u/arjuncec)\
**Post date:** [March 7, 2019, 6:26am UTC](https://discuss.elastic.co/t/set-search-text-box-value-programmatically/171235/1 "2019-03-07T06:26:31Z")

</div>

Kibana version :5.6.4

I need to set the value of the search text box value in dashboard tab programmatically. I have a textbox and a button outside kibana and once the user click the button, the value of the text box needs to be sent to the search textbox.  
How can we achieve it ?

---

<div class="post-metadata">

**Author:** ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)\
**Post date:** [March 7, 2019, 6:45am UTC](https://discuss.elastic.co/t/set-search-text-box-value-programmatically/171235/2 "2019-03-07T06:45:42Z")

</div>

You can add any search as Url Parameter when opening the page:  
[https://myhost:5601/app/kibana#/dashboard/79ffd6e0-faa0-11e6-947f-177f697178b8?\_a=(query:(language:lucene,query:'beat.name:"mySearchValue"')](https://myhost:5601/app/kibana#/dashboard/79ffd6e0-faa0-11e6-947f-177f697178b8?_a=(query:(language:lucene,query:'beat.name:%22mySearchValue%22')))

In the query you can define the conditions as required, then you can use this url in an iframe or similar...

---

<div class="post-metadata">

**Author:** ![arjuncec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arjuncec/32/40593_2.png) [@arjuncec](https://discuss.elastic.co/u/arjuncec)\
**Post date:** [March 7, 2019, 6:51am UTC](https://discuss.elastic.co/t/set-search-text-box-value-programmatically/171235/3 "2019-03-07T06:51:12Z")

</div>

Ya.. That works. But..  
I have the kibana running in iframe and whenever the user changes the value of the text box and clicks the button, I will need to reload the iframe with the new url. I don't want to do that. I need just to pass the value to the search text box whenever the user changes the text box value and submits the button.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 4, 2019, 6:51am UTC](https://discuss.elastic.co/t/set-search-text-box-value-programmatically/171235/4 "2019-04-04T06:51:13Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
