Hello
I have a chronoconnectivity form which reads data from a table. I have a field in the table called 'startdate' of type "date" which is in the default format Y-m-d in the database.
I want to make this field editable. So I in the HTML box I tried to
a) add a text input field for that date:
Data.startdate:<input name="Data[{Data.id}][startdate]" id="dt_{Data.id}" value="{Data.startdate}" type="text" />
b) I also made this field of datepicker class and I set the format to be "Y-d-m"
However, the calendar does not work and the year and month appear as NaN.
I also checked the https://www.chronoengine.com/forums/posts/t102870/date-picker-not-working-on-edit-forms.html?keywords=datepicker%20edit%20field%20NaN
but it did not help me.
Could you please help?
Thank you
Amelia
Hi Amelia,
"So I in the HTML box I tried to", sorry, which HTML box exactly ?🙂
The syntax to call the value depends on where you call it, you can use your own field code as you did in #a, or you can create a "fields" view, and use a text field or calendar field, if you use a calendar field then the format should be set to Y-m-d
The field value should also be set correctly, but this depends on "where" you will call this fields view ?
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
I am in Admin - > Settings -> HTML
Display type is Table
Data is the name of the model, 'id' and 'startdate' are fields in the table which are part of the model.
They appear in the Columns List:
Data.id:ID
Data.startdate:Arrival
I want to make startdate to be editable so I added in the Admin->Settings->HTML
an entry for that as above.
I hope this makes more sense
Hi Amelia,
Please show me a screenshot, there is no "Admin->Settings->HTML" path in v6
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Sorry I have v5. I made a mistake in the tag of this question. Apologies
Hi Amelia,
No problems, are you able to build this connection in v6 instead ?
But your code in #a should work, the {Data.startdate} should call the field value in the input in v5
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hello Max
Sorry for this delay. I was away.
I do not use v6 at all. I only have v5 installed.
See the image attached.
The 'Data' is the model name. 'startdate' is a field I read from a table and it is of type 'date'.
It looks that even if I set this field to be editabel as a 'text' it is recognised as a date.
But it seems the format of the date might case issued.
Originally I had this field as a datepicker and I set the format to be 'Y-m-d' but that did not solve this problem either.
If I change the field type in the structure of the table in phpmyadmin to 'varchar', then it works.But I do not want to go down that route.
Thank you for your help.
Amelia
Hi Amelia,
If the database field type is "date" then the datepicker format should be set to "Y-m-d", you may also use a normal text field and ignore the format.
If you can build this connection in v6 then you will have more control over the view, and there is a fields wizard included.
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.