0

I am using an booking form for vacation rental. Therefor i use a external software which provides a booking form for my own homepage. The software gives me an code like this to insert in my homepage:

<div id="booking-tool-container-apartmentXXXXXX">
<script type="text/javascript" src="https://login.XXXXXXXXX.com/js/Settings/BookingToolIframe.js"></script>
<script>BookingToolIframe.initialize({"url": "https://login.XXXXXX.com/de/booking-tool/iframe/XXXXXX", "baseUrl": "https://login.XXXXXX.com", "target": "#booking-tool-container-apartmentXXXXXXXX"})</script>
</div>

This code displays a booking form with Arrival and Departure. I want to prefill the arrival and departure row with dates, like this: website.com/booking?arrival=01.01.2019&departure=10.01.2019

The problem is: I dont have access to the direct html code, i only have the code above to insert in my website.

If i look in the html code via Inspector in my browser i can see following interesting things:

  • field 1: arrival has the name "dpArrival"
  • field 2: departure has the name "dpDeparture"

My question: Is there a way to prefill this form with URL Parameters - even if i dont have access to the direct html code?

Gautam Rai
  • 2,445
  • 2
  • 21
  • 31
wdfx
  • 11
  • 2
  • To do so, the website inside the iframe will need to read the query and set the values in the form, it would be best to contact the support of the tool and ask them if its possible to prefill the inputs, I assume they have a way, but only they know. – Art3mix Dec 20 '18 at 13:06
  • press f12 on the website in the console you can find all the html – J.vee Dec 20 '18 at 13:06
  • PS. because the iframe is from other domain you can't access the content of the iframe (you could if the iframe would be from the same domain) read answers here: https://stackoverflow.com/q/364952/8727608 – Art3mix Dec 20 '18 at 13:07

0 Answers0