I've been struggling with this issue in the last 2 days and nothing seems to work for me so far.
What I want this piece of code to do: user click searchButton, an empty data frame is created.
eventReactive works fine for me on normal UI.R but when I tried to use index.html it doesn't work. My code is below:
Server.R:
new_search <- eventReactive(input$searchButton, {
search_term <<- input$searchText
test <- data.frame()
})
Index.html
<!-- Search bar -->
<form class="sidebar-form">
<div class="input-group">
<input id="searchText" type="text" class="form-control" placeholder="Ask me anything..">
<span class="input-group-btn">
<button id="searchButton" type="button" class="btn btn-flat action-button">
<i class="fa fa-microphone"></i>
</button>
</span>
</div>
</form>
Please help :( Thank you so much
edit: my html template is from here: https://onepagelove.com/creative
I added the following code to the header section:
<!-- Shiny JS -->
<script src="shared/jquery.js" type="text/javascript"></script>
<script src="shared/shiny.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="shared/shiny.css"/>