PHP Classes

<BUTTON> tag for submit form

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  PHP Forms Class with HTML Generator and JavaScript Validation package blog  >  Locating addresses on...  >  All threads  >  <BUTTON> tag for submit form  >  (Un) Subscribe thread alerts  
Subject:<BUTTON> tag for submit form
Summary:how can i use <BUTTON> tag for submit form?
Messages:7
Author:Nabi KaramAliZadeh
Date:2008-03-28 15:12:15
Update:2008-04-07 03:55:37
 

  1. <BUTTON> tag for submit form   Reply   Report abuse  
Picture of Nabi KaramAliZadeh Nabi KaramAliZadeh - 2008-03-28 15:12:15
hi,

with this class, how can i use <BUTTON> tag for submit form?
ex: <button type="submit">Upload</button>

thanks
nabi

  2. Re: <BUTTON> tag for submit form   Reply   Report abuse  
Picture of Ares DFE Ares DFE - 2008-03-28 16:06:59 - In reply to message 1 from Nabi KaramAliZadeh
Try a onclick event with a javascript code to submit

something like

<form id="myForm">

<input type="TEXT" value="BLAH" />

<button onclick="javascript:document.getElementById('myForm').submit();" />

</form>


It should work...

  3. Re: <BUTTON> tag for submit form   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-03-28 16:15:14 - In reply to message 1 from Nabi KaramAliZadeh
I think you mean <input type="button"> . You can add an input like that specifying the TYPE parameter set to "button".

Just keep in mind that button does not submit forms by itself. You need to use Javascript to make button clicks trigger form submission.

  4. Re: <BUTTON> tag for submit form   Reply   Report abuse  
Picture of Nabi KaramAliZadeh Nabi KaramAliZadeh - 2008-03-29 00:03:54 - In reply to message 3 from Manuel Lemos
no no !

i want just generation and create this:
<button type="submit">Upload</button>
with 'Forms generation and validation' class.

  5. Re: <BUTTON> tag for submit form   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-04-06 20:58:32 - In reply to message 4 from Nabi KaramAliZadeh
To tell you the truth I was not even aware of that kind of form input.

Anyway, since it is basically the same as inputs of type submit, reset and button, I added a new parameter named Content for those types of input that you can use to define the HTML that will define the button content in the clickable area.

  6. Re: <BUTTON> tag for submit form   Reply   Report abuse  
Picture of Nabi KaramAliZadeh Nabi KaramAliZadeh - 2008-04-07 01:51:48 - In reply to message 5 from Manuel Lemos
yeah,
i see, it's ok.
---
$form->AddInput(array(
"TYPE"=>"submit",
"ID"=>"button_subscribe_with_content",
"ACCESSKEY"=>"c",
"Content"=>"<img src=\"http://files.phpclasses.org/graphics/add.gif\" style=\"border-width: 0px;\" /> Submit button with <u>c</u>ontent",
));
---
thanks for add this option.
you can correction this file: 'test_form_page.html'

thanks
nabi

  7. Re: <BUTTON> tag for submit form   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-04-07 03:55:38 - In reply to message 6 from Nabi KaramAliZadeh
Ok, I just updated the example page. Thank you for the notice.