Help Search our knowledge base:

Index - FAQ - Misc

 Details
Frequently Asked
Question (FAQ)

Document Number: 1163

Optimize for Printing
E-Mail This Link

 Feedback
This document ...
helps resolve my question or problem.
does not apply to my question or problem.
is inaccurate for my question or problem.
Pasting HTML into DotNetNuke?

DotNetNuke is an open source ASP.NET content management system and .NET web application development framework.

The DotNetNuke system does not allow you to paste HTML forms directly into their system. Because of this you must make minor edits to the shopping cart HTML before pasting the code into your DotNetNuke template.

A basic cart button would look like this:
    <form action="https://qccart.net/cgi-bin/cart.cgi">
    <input type="hidden" name="AddItem" value="jter|Test|4.95|1">
    <input type="submit" alt="Add to cart" value="Add To Cart">
    </form>

Here is an edited version for DotNetNuke:
    <div action="https://qccart.net/cgi-bin/cart.cgi">
    <input type="hidden" name="AddItem" value="jter|Test|4.95|1">
    <input onclick="this.form.action='https://qccart.net/cgi-bin/cart.cgi';this.form.submit();" type="submit" alt="Add to cart" value="Add To Cart">
    </div>

Summary of edits:
  1. DotNetNuke wraps the entire page in a large form. In order to avoid nesting forms you need to change the two form tags to be div tags.
  2. Now you need to add a small snip to your add to cart button so that DotNetNuke submits the data to our servers. Add the onclick="this.form.action='https://qccart.net/cgi-bin/cart.cgi';this.form.submit();" attribute to the submit button.

Note: Because of how DotNetNuke works you can only use a single add to cart form per page. You can still use multiple buttons as long as the additional buttons use a link.