Focus on IT Recommend

Home > php - how can create simple button in cakephp without html code

php - how can create simple button in cakephp without html code



I am new in cake php. i am creating a simple button by cake php code. but it make by default submit button. i dont want to use HTML code.

echo $this->Form->input('name');
echo $this->Form->input('username');
echo $this->Form->input('email');
echo $this->Form->button('ajax_button');

Is there any way so that i can add simple button without using HTML. i mean by cake php code. above button code create a submit button

Thanks in advance

php cakephp-2.3
  this question
asked Apr 12 '16 at 10:45 sandeep soni 182 9


1 Answers


try this

Recommend:php - Html Tags not working in Cakephp Mail

);> <php echo $this->Form->create('Feedback', array('controller' => 'Feedbacks', 'action' => 'sendmail')); echo $this->Form->email('mail',array('label' => false,'required' => true,'class'=>'form__in form__in--text form-control','p

echo $this->Form->button('ajax_button',array('type' => 'button'));

  this answer
answered Apr 12 '16 at 10:51 Tony Stark 581 1 3 13      Great it is working thanks. –  sandeep soni Apr 12 '16 at 11:09      @sandeepsoni my pleasure –  Tony Stark Apr 12 '16 at 11:11


Recommend:php - How can I convert HTML to plain text in CakePHP

posts a message, they enter the text in a textarea, and on a beforeSave(), among other actions, the system uses Sanitize::html() to replace the characters to make HTML inputs safe. The problem is that when the user wants to edit the messag

------splitte line----------------------------