Learn More





Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesHow to create a custom  html form How to create a custom html form
New Post
5/22/2013 5:00 AM

I need to create my own form which will be submitted to an external site (a payment provider, very precise about the post request). I've written a module which outputs the html for my form, but this won't work as the page (and thus my module) is enclosed in the DNN form and nested forms aren't valid.

How can I work around this?

I've thought about writing
    "[/form][form name='myform' action='https://paymentprovider']....[input type='submit' value='Pay'][/form][form name='dnnform_part2']"
So '[/form]' in front of my own form to close the DNN form and open a dnnform_part2 at the end (I know that won't join the 2 dnn form parts, it's just to get valid html), but this is a very ugly hack.

 Is there a better way?

New Post
5/22/2013 5:09 AM
My hack won't even be valid (although it seems to work in the major browsers) because the dnn form is at a much higher level in the DOM.
New Post
5/22/2013 7:58 AM

every page is enclosed in a form. What you have to do is: forget the form tags, but add the approbriate properties (PostbackUrl=...) to the "send" control (any server side asp control like asp:Button, asp:LinkButton, asp:ImageButton or whatever).

Best wishes

Michael Tobisch
DNN★MVP - Michael Tobisch's Site about DNN, SQL Server, ASP.Net and other related stuff - The most vibrant community around the DNN-platform
New Post
5/22/2013 8:27 AM

I've never done that before, not completesely sure what you mean, I guess that would mean that the complete page (=all fiels, including the viewstate) is submitted to the payment provider?

I don't think that's going to work. The payment provider requires a sha1-signature to be calculated over all data sent and they are very specific in which fields your may send (adding unknown fields will invalidate the request) and how to send it. They specifically state that it has to be a 'regular post request' and that "a postback won't work".

My solution currently works (although I don't know yet if it will work for all browsers as it technically is invalid html). I'm not sure if what you propose will ever work.


New Post
5/22/2013 2:12 PM
Create the form as a standalone HTML page and embed it into a page in your DNN site via an IFrame.
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesHow to create a custom  html form How to create a custom html form

These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?