I need to modify a baked [url removed, login to view] View in a CakePHP project. Actually the edit-view has got a section of checkboxes which refers the following join table (in a MySQL database):
CREATE TABLE IF NOT EXISTS `amenities_properties` (
`id` int(11) unsigned NOT NULL auto_increment,
`property_id` int(11) NOT NULL,
`amenity_id` int(11) NOT NULL,
`specify` varchar(100) NOT NULL default 'yes',
PRIMARY KEY (`id`)
The join table is extended with the extra field 'specify' and right now the [url removed, login to view] partially refers this table by using the default FormHelper like this:
echo $form->input('Amenity', array( 'type' => 'select', 'multiple' => 'checkbox' ));
But, as you can see, like this no extra value for 'specify' is handled.
What I need is to change the edit-view so that a user can set values 3 possible values for the 'specify' field like this:
'no' ....................if checkbox is left unchecked
'yes' ...................if checkbox is checked
'whatever'...............if checkbox is checked AND a string 'whatever' is inserted
and after that, the join table in the database should be properly updated when button SUBMIT is pushed.
In other words I need to associate to each checkboxes an additional input text field to be eventually filled only if the checkboxes are previously checked.
[url removed, login to view]
In order to visualize better what I need, i attached an image "from this to this" that should better show you what I'm talking about.
If you think you can do this work don't hesitate to ask me any further details and if you'll be choose for the job I will upload the working CakePHP project on a webhosting and give you FTP and MySQL access.