Page 1 of 1
No red square to the right of required date field
Posted:
Wed Jul 21, 2010 1:49 pm
by transcan
Hello.
How do you have the red square appear to the right of a required date field? Other fields have a red square but I cannot seem to figure out how to have it next to a required date field.
Thanks in advance.
Re: No red square to the right of required date field
Posted:
Wed Jul 21, 2010 2:53 pm
by cantlep
Hi,
The red square indicates a mandatory field in the database. If it's not set to be required in the DB then by default, Xataface will not show the red square. You can either change this in the DB by making it madatory or add this in fields.ini for the respective table and respective column.
- Code: Select all
validators:required = true
Rgds
Paul
Re: No red square to the right of required date field
Posted:
Wed Jul 21, 2010 3:26 pm
by cantlep
Apologies, I didn't really read your question properly. I think the validators:required may still work though...
Re: No red square to the right of required date field
Posted:
Thu Jul 22, 2010 7:32 am
by transcan
Yes, this did work. Thanks.
Re: No red square to the right of required date field
Posted:
Thu Jun 30, 2011 10:17 am
by ADobkin
I am having this problem also, at least as of version 1.2.6. I think it applies to more than just date fields, but definitely at least to date and time fields. I have date and time fields set to NOT NULL in MySQL, but the red dot does not appear next to these fields on the edit page unless I explicitly enter the validators:required = true in fields.ini.
My understanding is that all fields that are defined as NOT NULL are required by default. Is this a known bug, or am I doing something wrong?
Thanks,
Alan