Forums

CF6, how do I set a calendar starting date based on the user nput in another calendar field?

zingales 24 May, 2017
Hi!
I have a check in and checkout calendar fields in a hotel reservation form.
I want to dynamically set the start date of the check out at least after the date the user has choosen in the checkin calendar.
A bonus would be to set the checkout start date a few days AFTER the user provided checkin date.
So if the user sets as checkin date 25-12-2017 the selectable dates in he checkout calendar field should start after the checkin date or better a few days (after the checkin date to set a minimum number of nights per stay).

Is it possible to calculate a date difference - expressed in days- and set it in another field, so it would be shown in the email sent by the form?

Is there a syntax guide or a manual for crhonoforms 6?
thanks in advance.
Max_admin 25 May, 2017
Hi zingales,

The "Advanced" tab of the calendar element has a start and end calendar fields, set the "start calendar" field in the "2nd calendar" field to this:

#id_of_first_calendar


if you want to add few days then you need to use the "Function" event.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
zingales 25 May, 2017
that's great, but it's just part of the answer.

As many other users here already asked: WHERE IS THE MANUAL?
Where are the DOCS about the syntax?

You kindly answer users questions in the forum, but there would be much less or no questions with a manual.
I beg you pardon if I'm wrong, but I didn't found it.

thanks in advance,
Max_admin 25 May, 2017
Hi Zingales,

i'm trying to have a manual up as soon as possible, but its still not yet ready.

What are the topics you want to have in the manual first ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
phoenix89r 21 Feb, 2019
Hi Max !
I have 2 calendar fields.
I want to dynamically set the startdate of the second calendar after 15 days the date the user has choosen in the first calendar.
I've set #id_of_first_calendar in the "Start calendar" of the "Advanced" tab of the second calendar;
I've set a "Function" event in the first calendar, but I don't understand what is the right syntax of value to use in it. Can you help me?

thanks in advance.
Max_admin 10 Mar, 2019
Hi phoenix,

I just read this now!

You can set the first calendar field to "reload" the 2nd calendar field, and pass the value of the first calendar field to the "Earliest date" field of the 2nd when its reloaded using {data:first_calendar_name}

Pay attention to have the same "real format" setting in both fields!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
phoenix89r 20 Mar, 2019
Hi Max,
I passed the value of the first calendar field to the "Earliest date" field of the 2nd using {data:first_calendar_name}, but I need that the "Earliest date" starts 15 days after the data set in the first calendar.
So I need ad expression in "Earliest date" that give me ( {data:first_calendar_name}+15days) but I don't no what is correct syntax.

thanks in advance.   
Dsign 13 Apr, 2019
Same problem here Max!
I got 2 calendars and the date of the second calendar needs to be a +30 days later.
Max_admin 13 Apr, 2019
Hi,

You can try this:
{date:(data:first_calendar_name)$+30days}
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Dsign 13 Apr, 2019
Still not working
On Avanced of CALENDAR-2
Earliest date/time
{date:(data:CALENDAR-1_ID)$+30days}

Start calendar
#CALENDAR-1_ID

... What am i missing here?
Max_admin 14 Apr, 2019
You need to use the first calendar name not id!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Dsign 14 Apr, 2019
done!... still not working... 😟

On Avanced of CALENDAR-2
Earliest date/time
{date:(data:CALENDAR-1_NAME)$+30days}

On Start calendar
#CALENDAR-1_ID (tried with CALENDAR-1_NAME too)

is the any other thing that ive should have done/add somewhere (event/function/etc)?
Max_admin 14 Apr, 2019
Do you have the first calendar reloading the 2nd one on change ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Dsign 14 Apr, 2019

This is private content

Max_admin 14 Apr, 2019
Ok, that setting is fine, but the first field "reloads" the 2nd one on change ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Dsign 14 Apr, 2019

This is private content

Dsign 14 Apr, 2019
Then,.. what should i put in the value field?
Max_admin 15 Apr, 2019
The value setting of the 2nd calendar field will have
{date:(data:first_calendar_name)$+30days}
But this will work only if the first calendar field reloads the 2nd calendar.

Did you manage to get it working ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Dsign 15 Apr, 2019
no yet, because i still can't make the fist calendar reload the second one.
the pics i sent you show the first calendar reload action setting.

... what is still missing there?
phoenix89r 16 Apr, 2019
Hi,
I set the FIRST calendar events tab in this way:
on "change"
actions=reload
Element(s) identifier=second_calendar_name.

In the SECOND calendar advanced tab I set:
Earliest date/time= {date:(data:first_calendar_name)$+30days}
start calendar=#calendar-1_ID

but when i try to select date in the first calendar it reloads all the forms, not only the SECOND calendar!
what did i do wrong?

thanks
Max_admin 16 Apr, 2019
Ok, the syntax was wrong, it should be:
{date:$(data:calendar1)+30days}
But the behavior may still not work as expected because the change event is not triggered for the calendar fields, that should be fixed in the next update though!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Dsign 16 Apr, 2019
Same CFG here,... But on my side, when i select a date on the first calendar... it does nothing at all.😟
Max_admin 16 Apr, 2019
here is a demo form but as I noted it will not work correctly before the next update![file=12069]double_calendar_16_Apr_2019_20_48_43.cf6bak[/file]
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 23 Apr, 2019
This should now work with the new update!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Dsign 24 Apr, 2019
The demo works!... but when i try the exact same setting on my forms... it reloads and doesn't show the second calendar anymore.
No hidden opt activated... and still not showing after reload,... weird isn't?
Max_admin 24 Apr, 2019
In the page settings of the "reloaded" calendar, you need to set the page type to "standalone", did you do that ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Dsign 24 Apr, 2019
im working on classic v6 mode... and i don't see that page type option.
Max_admin 24 Apr, 2019
What do you have in the reload event ? do you have {view:dropdown_view_name} ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Dsign 26 Apr, 2019
on classic v6 mode: it just says "reload"
Dsign 27 Apr, 2019
can i have the same working example using CFv6 Classic (im not comfortable with the 6.1v)
phoenix89r 09 May, 2019
Hi,
i've update chronoforms to 6.1 and now first calendar reloads the second one, but there is a problem:
the second calendar starts 15 days after today, not the date sets in first calendar
this is my configuration
I set the FIRST calendar events tab in this way:
on "change" actions=reload
Element(s) identifier=second_calendar_name.
In the SECOND calendar advanced tab I set:
Earliest date/time= {date:(data:first_calendar_name)$+15days}
start calendar=#calendar-1_ID
there is a problem in syntax? what did i do wrong?

thanks
phoenix89r 09 May, 2019
I forgot to mention that in SECOND calendar "advanced" tab i set :
Reload event: reload

now i've updateted my form to 6.1 form structure, but now when I set date in the first calendar, it reloads the whole page ! what did i do wrong?
Max_admin 11 May, 2019
You should replace "second_calendar_name" and "first_calendar_name" with the field name of the 2nd and first calendars!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 11 May, 2019

can i have the same working example using CFv6 Classic (im not comfortable with the 6.1v)


What exactly is not good in your opinion ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.