Inserting html into form is breaking my html: Looking for more efficient method

MandyCat

New Member
I've got some php code that creates an order form for me. When the users submits their info I've set it up to move into an upsell page. This upsell page contains a form that has an action to add this upsell to the current purchase the user is making if they take the upsell. This upsell page I have has multiple buttons on it for the user to take the upsell. I've tried to place my copy into the form and create multiple inputs to submit the form but when I place the copy within the form it breaks all my formatting for the copy. There isn't any css for the form and I've tried placing "form" in front of all the css for this copy, but that didn't do anything. For example, the floating of images gets disabled, paragraph breaks and line breaks don't work. Some spacing and other things aren't being read and used. The form looks something like this:\[code\]<form action="/form/php/upsell-handler.php" method="post" /> <input type="hidden" name="ProductId" id="ProductId" value="http://stackoverflow.com/questions/14617133/3" /> <!-- <input type="hidden" name="SubscriptionId" id="SubscriptionId" value="http://stackoverflow.com/questions/14617133/0" /> --> <input type="hidden" name="IfYesRunActionSet" id="IfYesRunActionSet" value="http://stackoverflow.com/questions/14617133/0" /> <input type="hidden" name="IfNoGoTo" id="IfNoGoTo" value="http://stackoverflow.com/order/instant/" /> <input type="hidden" name="IfYesGoTo" id="IfYesGoTo" value="http://stackoverflow.com/order/instant/" /> <!-- Buttons --> <div id="hid" class="buttons" style="display:none;visibility:hidden;"><br /> <input src="http://stackoverflow.com/questions/14617133/images/GetInstantAccess.gif" type="image" value="http://stackoverflow.com/questions/14617133/Submit" id=Yes name=Yes /> </div></form> \[/code\]This is basically the guts of my upsell html page. I was thinking of doing something like this:\[code\]<form action="/form/php/upsell-handler.php" method="post" /> <input type="hidden" name="ProductId" id="ProductId" value="http://stackoverflow.com/questions/14617133/3" /> <!-- <input type="hidden" name="SubscriptionId" id="SubscriptionId" value="http://stackoverflow.com/questions/14617133/0" /> --> <input type="hidden" name="IfYesRunActionSet" id="IfYesRunActionSet" value="http://stackoverflow.com/questions/14617133/0" /> <input type="hidden" name="IfNoGoTo" id="IfNoGoTo" value="http://stackoverflow.com/order/no/" /> <input type="hidden" name="IfYesGoTo" id="IfYesGoTo" value="http://stackoverflow.com/order/yes/" /> <!-- Buttons --> AD COPY GOES HERE <div id="hid" class="buttons" style="display:none;visibility:hidden;"><br /> <input src="http://stackoverflow.com/questions/14617133/images/GetInstantAccess.gif" type="image" value="http://stackoverflow.com/questions/14617133/Submit" id=Yes name=Yes /> </div> MORE AD COPY <div id="hid" class="buttons" style="display:none;visibility:hidden;"><br /> <input src="http://stackoverflow.com/questions/14617133/images/GetInstantAccess.gif" type="image" value="http://stackoverflow.com/questions/14617133/Submit" id=Yes name=Yes /> </div> MORE AD COPY <div id="hid" class="buttons" style="display:none;visibility:hidden;"><br /> <input src="http://stackoverflow.com/questions/14617133/images/GetInstantAccess.gif" type="image" value="http://stackoverflow.com/questions/14617133/Submit" id=Yes name=Yes /> </div></form> \[/code\]What I've settled for is to basically create multiple forms on a single page instead of trying to make the entire page a form. So I'm doing this:\[code\]AD COPY entire form with single buttonAd COPYentire form with single button...etc\[/code\]This doesn't break my html and serves it's purpose.If you can come up with a more efficient way to do this I'd love to hear it and use it. Thanks!
 
Back
Top