I want display a JS form from API before display my result page to my customers,
I tried to display the form in a modal or a popup but its JS form from API so i dont have control to close it when i click on the submit button and with this way the form is display everytime when i launch a new search, i want show it single time at the first search from my homepage so i think i must run it before my result page
I tried to render a new page before search result but i loose my search params if i do that
To simplify: First search from Homepage -> API Pipedrive Form -> Result Page
My searchbar
<%= form_tag resultat_path, id: "address_input", method: :get, autocomplete: 'on' do %>
<%= text_field_tag :location, params[:location], {id: 'address', class: "namanyay-search-box", placeholder: '10 rue Nationale Lille', :required => true} %>
<%= select_tag(:room_type, options_for_select([ ['Maison', "Maison"], ['Appartement', "Appartement"], ['Terrain', "Terrain"], ['Local Commercial', "Local_Commercial"], ['Immeuble de rapport', "Immeuble_de_rapport"], ['Murs commerciaux', "Murs_commerciaux"], ['Fond de commerce', "Fond_de_commerce"]]),
{class: "namanyay-search-box-type", :prompt => "Type de bien", :required => true}) %>
<%= select_tag(:nb_piece, options_for_select([['0', "0"], ['1', "1"], ['2', "2"], ['3', "3"], ['4', "4"], ['5 et +', "5 et +"]]),
{class: "namanyay-search-box-room", :prompt => "Nombre de pièces", :required => true}) %>
<%= submit_tag "Find !", id: "namanyay-search-btn" %>
<% end %>
My JS form
<div class="pipedriveWebForms" data-pd-webforms="https://pipedrivewebforms.com/form/f5cd01e9418f0b683195eb0e821770181945719">
<script src="https://pipedrivewebforms.com/webforms.min.js"></script>
</div>