Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...forms within formsforms within forms
Previous
 
Next
New Post
1/26/2009 12:02 PM
 

At the beginning of the body section on my DNN home page, I have the following form tag, which basically puts the whole body into this form:

    <form name="form" method="post" action="/Home/tabid/37/Default.aspx" onsubmit=" return Webform_OnSubmit();" id="form" enctype="multipart/form-data" style="height: 100%;" autocomplete="off">

But I want this page to contain a paypay "buy-now" button, which also has a form, like this:

<form method="post" action="https://www.sandbox.paypal.com/cgi-bin/webscr">
    <input type="hidden" value="_s-xclick" name="cmd" /> <input type="hidden" value="18672" name="hosted_button_id" /> <input border="0" type="image" alt="" name="submit" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" /> <img height="1" border="0" width="1" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" alt="" />
</form>
The top-level form is overriding this and not allowing the post back to paypal.  Is there a way in DNN to replace that default form on the page with the one I want?
 
New Post
1/26/2009 1:38 PM
 

no, you have to utilize the DNN form, check out the core modules (e.g. Text/HTML) and development tutorials at dotnetnuke.adefwebserver.com.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
1/26/2009 4:09 PM
 

aldeng-
Here are two possible solutions (without adding a special third-party module):

  1. Use an IFRAME (can be done within a Text/HTML module) to peek at a separate HTML page that has your PayPal form code.
     
  2. Use an alternate method of linking to PayPal instead of posting a form.  
     
    Here's a 2-line example:  http://www.efficionconsulting.com/DotNetNuke/Modules/PayPalDonations/tabid/431/Default.aspx

 
I'd go with #2 if you want to keep things simple.

-mamlin


esmamlin atxgeek.me
 
New Post
1/26/2009 5:21 PM
 

Thanks Mamlin, that did the trick!

And googling around I found another method that also worked for me.  The trick is to modify the code generated by paypal to use the form already on the page with an "onclick."  I changed the button code to the following and it worked like a charm:

<input type="hidden" value="_s-xclick" name="cmd" /> <input type="hidden" value="18722" name="hosted_button_id" /> <input border="0" type="image" alt="" onclick="document.getElementById('form').action='https://www.sandbox.paypal.com/cgi-bin/webscr';" name="submit" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_donate_LG.gif" /> <img height="1" border="0" width="1" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" alt="" />

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...forms within formsforms within forms


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.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out