This project is read-only.

Form inside Textbox Widget

Topics: Controls, Themes
Aug 15, 2011 at 5:44 PM

Hi guys,

I'm trying to set up a textbox widget to contain some html with a form in it.

(Basically it's an optin form for my autoresponder)

However, while the form works perfectly when I test it as a regular HTML page, I can't get it to work in the textbox widget.

The button submits the form, but the page just refreshes and doesn't submit to the URL in the "action" property of the form tag.

I'm assuming it's to do with multiple nested <form> tags since BE must have one, then I'm putting another inside the text box which is being ignored?

Does anyone know if there is a simple work around for this please?

Any ideas?



Aug 15, 2011 at 6:09 PM

I just had a thought - and so far this seems to work ok.

Create another static page to hold your form and save it in the BE folder.

Now create a textbox widget, and use an <iframe> tag to add the form to your text box.

<p><iframe id="datamain" src="" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="100%" height="400"></iframe></p>

Now when you submit the form within the textbox widget, it doesn't interfere with the .net form tag or mess with any BE stuff.

However, if you're creating a "subscribe" or "optin" form for an autoresponder like me, you'll also need to make some custom "thank you" and "error" pages for when the form is submitted. Just create 2 more static pages and put those in the BE folder too. Then when the form is submitted, only the portion within the <iframe> tag will be really be submitted, and that <iframe> will refresh without affecting the rest of the page.

Hope this helps save some frustration for others...


Aug 15, 2011 at 6:54 PM
Edited Oct 24, 2011 at 9:38 PM

Seems like a really good idea!!!


I too was trying to create a widget for a form.  Was trying to get iContact to work.


I think this will work !!!


Going to give it a try.

It helps me out!!




Brian Davis

Java Blog