It's taken me quite a while to get my head round Chronoforms v7 compared to v5.
I have a basic form which submits a start date, end date and number of adults to a hotel's third party booking system. The data is redirected and the date formatting works.
However, there are two extra elements needed which I did manage to setup in v5 which I can't seem to setup in v7.
[strong]<?php
$form->data['arrival'] = date('Y-m-d');[br] $form->data['departure'] = date('Y-m-d', strtotime ('+2 days'));[br]?>[/strong]
and in the HTML (render form) block "on submit" I added the following "form tag attachment" to open the results in a new window:
onSubmit="return validate();" target="_blank"
[br]Can anybody assist me with this please? I've spent quite a while trying to find a solution to these last two items.
Many thanks,
Mike
I have a basic form which submits a start date, end date and number of adults to a hotel's third party booking system. The data is redirected and the date formatting works.
However, there are two extra elements needed which I did manage to setup in v5 which I can't seem to setup in v7.
- I need to set the arrival date to "today's date"
- I need the redirection results to open in a new window
[strong]<?php
$form->data['arrival'] = date('Y-m-d');[br] $form->data['departure'] = date('Y-m-d', strtotime ('+2 days'));[br]?>[/strong]
and in the HTML (render form) block "on submit" I added the following "form tag attachment" to open the results in a new window:
onSubmit="return validate();" target="_blank"
[br]Can anybody assist me with this please? I've spent quite a while trying to find a solution to these last two items.
Many thanks,
Mike