Tuesday, October 8, 2013

Add a div around an input element in cakePHP


echo $this -> Form -> input('Return Date', array('type' => 'text', 'id' => 'dpd2', 'div' => array('class' => 'ankur')));
in the  view file produces HTML like-


<div class="ankur">
<label for="dpd2">Return Date</label>
<input name="data[ItineraryRequest][Return Date]" id="dpd2" type="text">
</div>

No comments:

Post a Comment