I have a database field that I want to be set to a checkbox in edit view.
I went into the fields.ini and put:
[myDbFieldHere]
widget:type = "checkbox"
nothing happens...
How do I set my database field to a checkbox?
7 posts
• Page 1 of 1
How do I set my database field to a checkbox?I have a database field that I want to be set to a checkbox in edit view.
I went into the fields.ini and put: [myDbFieldHere] widget:type = "checkbox" nothing happens...
Re: How do I set my database field to a checkbox?That's the correct syntax. Things to look for if it isn't taking effect:
0. Make sure that it is picking up the fields.ini file at all. Try changing some other settings in the fields.ini file to ensure that it is being picked up if you're not sure. 1. Check the name of the field. Make sure it is exact (it is case sensitive). 2. Check to make sure that you don't have 2 sections in your fields.ini file for the same field. -Steve
Re: How do I set my database field to a checkbox?Ah ha it was not in the right directory so it was not reaching the field.ini file.
Thank You Another question, How would I get the users login name from xataface into a field in my database automatically when inserting a new record? I was also trying to figure out getting the current date/time automatically as well.
Re: How do I set my database field to a checkbox?Implement the beforeInsert() trigger in the table delegate class, and make use of the Dataface_AuthenticationTool's getLoggedInUsername or getLoggedInUser method:
Re: How do I set my database field to a checkbox?i'm getting a parse error on line 29 which is the line:
$record->setValue('myDatabaseFieldNameHere', $username );
Re: How do I set my database field to a checkbox?Sorry.. my example is missing a semicolon at the end of the previous line.
-Steve
7 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 18 guests |