Copy link to clipboard
Copied
How do I insert a php form onto the Dreamweaver page without screwing up surrounding tables and alignment. I have accounted for the red box and "hidden" area around the form. I gave it plenty of empty space around it, but it won't go where it is supposed to and realigns everything else on the page. This is not the first time I have had this issue. It is so bad, I have finally made the entire front page an image to keep the form from shoving things up, or down or to the sides. This works, but of course it isn't a good plan for updating or SEO.
It is a short, simple customer inquery form. It is generated by a data software program being used by the company for a number of tasks, so I don't have much control over the form itself. I have had this problem in the past with things like PayPal buttons. I wanted to put the form on a popup page, but then they got involved with some marketing outfit which insists that the form needs to be visible on the front page.
Thanks, Cyndee
Copy link to clipboard
Copied
The fact that it's a PHP form makes no difference. PHP is a server-side language that outputs HTML to the browser. It's the HTML that you need to style.
It's not clear from your question whether the form is created in HTML and submits the data to a PHP script for processing, or whether the form is generated in part or in whole by PHP script. If it's all HTML, you just style it with CSS like any other page. If the form is generated by a PHP script, use a testing server or your live site to load the page into a browser. Then use the browser to save the page as HTML. You can then use the static HTML to design your page.
Copy link to clipboard
Copied
Here is the code that was given to me to use for the form
<form action="https://xxxxxx.xxxxx.com/AddForms/processFormSecure.jsp" method='POST'>
<input name="xid" type="hidden" id="xid" value="8277507820cf7f755bb0b31dc3b51b54" />
<input name="type" type="hidden" id="type" value="CustomFormWeb" />
<table>
<tr><td colspan=99 style="padding:4px;background-color:#000000;color:#FFFFFF">Contact Information</td></tr>
<tr><td>First Name *</td><td><input type='text' name='Contact0FirstName' value=''></td></tr>
<tr><td>Last Name *</td><td><input type='text' name='Contact0LastName' value=''></td></tr>
<tr><td>Email *</td><td><input type='text' name='Contact0Email' value=''></td></tr>
<tr><td colspan=99 style="padding:4px;background-color:#000000;color:#FFFFFF">Miscellaneous</td></tr>
<tr><td>Check all that apply:</td><td>
<input type="checkbox" name="Checkbox0" value="359"> Discover your Investment Return<br>
<input type="checkbox" name="Checkbox1" value="361"> Attend a Free Class<br>
<input type="checkbox" name="Checkbox2" value="363"> Schedule a Free Site Visit<br>
</td></tr> <tr><td colspan=2><input name="Submit" class="button np inf-button" type="submit" id="Submit" value="Submit" /></td></tr>
</table>
</form>
I think I will set up an html page and play with the colspan and padding and see if I can get some of the extra space out of it. But I don't understand why it won't stay where I put it. For example there was a large blank space in the column the form was placed in. (About 3 inches) I could use it to place a small logo or site search box. If I put the logo on the top, the form jumps down hanging off the bottom of the page, leaving a 5 inch gap. If I put the logo underneath the form, the form pushes up the menu bar, leaving a huge gap between it and the logo. I have tried using clear spacer gifs to force it to stay in the table boundaries and it just pushes everything out of alignment. Doesn't seem to matter if I align it top, or bottom. It just goes where it wants.
With the entire page (except menu bar) being an image now it sort off stays where I want it to be. So I figure this will work for now and I can piddle with the home page over the next few weeks and try and figure out a better solution. But the home page is loading slowly since it is a large .jpg file. The resolution is high because it is the home page and I wanted it to look decent (first impressions and all).
Since I have had this difficulty with .php forms before I think there must be something basic about the files I don't understand, like there is hidden code or space requirements. If this is true I would like to know the "secret" so that in the future I can have a better plan.
Thanks for all the help. I have found the forum community to be my saviors over the years.
Copy link to clipboard
Copied
There's no PHP involved in that form. It's pure HTML. It's not even being submitted to a PHP script, but to a JSP one.
There are two errors in the code, which might be causing the display problems. Replace both instances of colspan=99 with the following:
colspan="2"
The quotes are also missing from around the 2 in the colspan attribute of the table cell that includes the submit button.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more