How To Create A PHP Front-End To Your MySQL Database Using DaDaBIK - Customizing DaDaBIK
(Page 4 of 5 )
DaDaBIK provides us with a lot of possibilities to customize the interface. One of the most useful is the ability to choose from different HTML input types for each field in the form. In fact, you aren’t limited to only single-line text boxes when editing field values –- you can choose to use textarea, password, select and checkbox fields. All you have to do is select the right field type from the internal table manager.
Let me explain with an example: imagine that we want to use a <textarea> field for the field notes_cust and a pull-down menu for the field job_cust; in particular the menu must contain 5 pre-set options: Teacher, Programmer, Musician, Student and Entrepreneur. Here's how to set it in the Internal table manager:
For notes_cust we have to change the field type from text to textarea:

For job_cust we have to choice select_single as the field type, and fill in the box "Option to include" with all of possible options separated by the ~ sign, like this:
~~Teacher~Programmer~Musician~Student~Entrepreneur~
Note that I've put two ~ at the beginning of the string. This allows to have also a blank option.

Here's how our search interface looks after the changes mentioned above have been made:
Advanced featuresA lot of advanced features are also available and we'll see them in a future article about DaDaBIK, but let me just introduce the most important of them for now:
It is possible to:
- use multiple tables
- define which fields are required in the insert operation
- define the possible content of a field (e.g. a web field must be filled with a valid URL)
- decide if a field must be checked for possible duplications during inserts
- get the possible values of a select field from a different table, also using a custom SQL statement (foreign key feature)
- generate a unique ID for each insert
- define the operations allowed for each table
- change the position of the fields in the form
Next: Conclusion >>
More MySQL Articles
More By Eugenio Tacchini