PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, April 21, 2022

[FIXED] how can create simple button in cakephp without html code

 April 21, 2022     cakephp-2.3, php     No comments   

Issue

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


Solution

try this

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


Answered By - Akshay Sharma
Answer Checked By - Cary Denson (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing