Read Only Fields (Suggestion)

nassausky

Member
You are using DaDaBIK version 7.2 ENTERPRISE, installed on 03-16-2016, the last version of DaDaBIK is 7.2 released on 03-16-2016

You are runnning the last release of DaDaBIK
PHP Version: 5.3.29
mysql version: 5.6.28-76.1-log
Web server: Apache 2.2.23
Client: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
OS: Windows 10 Pro






Just a heads up. I know I can edit the php code to disable the changing of fields at particular times during the end users experience but I am surprised it's not a basic embedded feature that asks for this during setup in the ADMIN AREA 'form configurator'.

For example there should be a simple "READ ONLY?" check box for each field that enables the end user to decide if they want that field edited or just displayed during adding or editing.

First thing a user does after creating a database is creating a table that dadabik opens and uses. During the step the user creates their first field which normally is the id# and primary key value for the table which a normally gets automatically incremented. For example in Mysql we just enable the database to handle the auto increment so then we keep the user from touching that field during creation.

Does that make sense and wouldn't that be easier for the users who are creating databases with dadabik? I mean otherwise dadabik is more like a php framework which all require a little more time to setup. I like the yii framework to create a crud and application but the whole point of me getting dadabik was to skip some of the things that took me a bit of time to work on.

I hope you consider it because I don't think it will be too bad to add to the next update to dadabik. I might even be able to submit to you the php source code to have for the ADMIN AREA (form configurator) template if I ever get time but it would probably take you a fraction of the time it would take me to do so.

What do you think?
 

eugenio

Administrator
Staff member
I am not sure if I got what you mean, the readonly option is already available, in permissions, EDIT, you can set "Yes but disabled".

About the autoincrement field, are you suggesting that if a field is autoincrement, DaDaBIK should set by default the insert and edit permissions to NO? Yes, it could be nice, but basically you are just saving one (or a few) clicks, because 99% of the time you have to edit permissions anyway.
 

nassausky

Member
OMG yeah "Yes but disabled" was the simple answer. I saw it there but never knew that is what it did. That is what I wanted, to show the field yet have it disabled.


As far as the second question, do you think a majority of people set auto increment and want that field set for "Yes but disabled"? That's only a small possible suggestion but not critical since you said we have to edit the permissions 99% of the time anyway.

I read it back and I didn't explain it right.

Thanks!
 

eugenio

Administrator
Staff member
I think that the majority of people (including me) set autoincrement field permissions as NO in all the forms, normally you don't even need to see the IDs.
 

nassausky

Member
Come to think of if you're right. Most of the time I want to have a clue about what's going on with the id or auto increment fields I check at the database level and don't use it from the user front end.

I updated the title regarding your information.

Thanks
 
Top