html - cakePHP input with characters counting -
i have html code this:
<label>main text (<span class="main_text_count">0</span><span>) characters</span></label> <textarea name="data[news][sentence]" id="main_text" class="form-control"  required rows="8"></textarea> and don't know how create text area this, using form helper of cakephp.
simply done using form helper (both cakephp 2 , cakephp 3):-
echo $this->form->textarea(     'news.sentence',      [         'id' => 'main_text',         'class' => 'form-control',         'rows' => 8,         'label' => 'main text (<span class="main_text_count">0</span><span>) characters</span>'     ] ); in future make sure you've read cake's documentation.
Comments
Post a Comment