The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Submit input type - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17) +--- Thread: Submit input type (/showthread.php?tid=211) |
Submit input type - rubycat - Jul 12th, 2009 If I wanted to use an image as the form "submit" button, what would I have to change to make Form Tools 2 still work? I tried for 2 hours to do the test submission and not until I changed my code to a regular old input type=submit would it work. Non-working HTML: Code: <input type="image" name="send" src="poo.gif" alt="here it is" /> RE: Submit input type - Ben - Jul 12th, 2009 Hey Rubycat, Form Tools doesn't care how the information is sent - replacing a submitt button with an image button really won't make a difference. Was the form not getting submitted or something? If so, there's a problem with the submit button or form itself. That said, what you posted is fine... was it placed inside the <form> </form> tags? Also, try temporarily removing any JS. Maybe that's preventing the form from submitting... Odd! - Ben RE: Submit input type - rubycat - Jul 12th, 2009 Odd indeed! But here's the thing...it works with the input type=image when using the regular old process.php. But I swear, it doesn't submit when using the API. It simply reloads the page and empties out all the fields. RE: Submit input type - Ben - Jul 18th, 2009 Hmm.. one possibility that is that maybe when you use an image as your submit button, the name-value pair of that image button isn't sent along with the POST request. Try this: you know where you specify the name value of the submit button in the PHP? This bit: PHP Code: $params = array( Change "submit_button_name_attribute" to the name attribute of ANOTHER field in your form - any textbox should be fine. If you don't have one, create a hidden field and use the name attribute of that. Let me know if this helps at all... I'm curious to know if this was the problem! - Ben |