codeigniter legend
Hi all in codeigniter we can draw feildset like this: form_fieldset('legend', $attributes), but how can we draw form_fieldset with: 1. change the color of the legend only not to all the fieldset. 2. add checkbox beside l开发者_StackOverflow中文版egend. thank you all
EDIT: Well, i think i missunderstood your question. Do you want to add a legend with a checkbox inside your legend? If so, there is no real way of doing that with code igniters built in form helpers. You could write your own, but the easiest way would be to add it manually:
<?php form_fieldset(); ?>
<legend>Your legend text <input type="checkbox" />
<?php form_fieldset_close(); ?>
Original answer:
Well, the obvious way to change the folor of a legend is through CSS:
fieldset legend { color: #ff00ff; }
This will change only the color of the legend to magenta.
- To render a checkbox, use the form_checkbox. More info on the user guide.
精彩评论