I have just started working with Grocery Crud and am very impressed with the results.
To improve the library, I'd like to suggest some small changes on edit.php and add.php, as follows:
[html] <div class='form-field-box <?php echo $even_odd?>' id="<?php echo $field->field_name; ?>_field_box">
<div class='form-display-as-box' id="<?php echo $field->field_name; ?>_display_as_box">
<?php echo $input_fields[$field->field_name]->display_as?><?php echo ($input_fields[$field->field_name]->required)? "* " : ""?> :
</div>
<div class='form-input-box' id="<?php echo $field->field_name; ?>_input_box">
<?php echo $input_fields[$field->field_name]->input?>
</div>
<div class='clear'></div>
</div>
[/html]
The only difference from the original code are the ids:
id="<?php echo $field->field_name; ?>_field_box"
id="<?php echo $field->field_name; ?>_display_as_box"
id="<?php echo $field->field_name; ?>_input_box"
By adding those id attributes we can customize the generated form using CSS.
Check out the sample form I have attached this post.
So, what do you think?
Can it be changed that way?
-Rafael