In a table "Bike" there is a field "Rider" which is used as a foreign key to a "Person" table. If the "Rider" column is not editable, and one tries to create a new record-the record will not create. If the "Rider" column is editable the new record is created.
The query will only present the bike list for a particular user id, not for all users. Therefore I don't want the user to be able to edit the "Rider" column because that would add a motorcycle potentially to some other user.
I guess what I am looking for is a way to make a column writable to the database without the user being able to edit the column. Is this possible?
Closing this ticket with the comments of actual poster.
The bikes table was related to the person table. My first tries at creating a new entry were using a rider number in the bike table that did not exist in the person table.
Once I realized that and use a rider number that actually existed, new records were created.
You might need to make rider column as hidden & editable, with a default value of the actual logged in rider.
For defaults, you can refer docs.
Render as textbox with size 20, and initial value in textbox to 10
$col["editoptions"] = array("size"=>20, "value"=>'10');
Instead of 10, you can use session value of rider id.
PS: Please ignore last email, thought questions are same.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?