Spacing on Page
4 posts by 3 authors in: Forums > CMS Builder
Last Post: April 4, 2011 (RSS)
By maja13 - April 4, 2011
I have a registration form built in CMS Builder. There is a content area and the form area and between the two there is a large space on the page. Here is the link to the page:
http://www.intensifynow.com/intensifyform_test_view.php
Here is the code:
<!-- Conference Registration Form Starts Here -->
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<h2>
Intensify Women's Conference Registration
</h2>
<?php foreach ($conference_registrationRecords as $record): ?>
<?php echo $record['content'] ?><br/>
<hr/>
<?php endforeach ?>
<p>*required fileds</p>
<?php if (@$errorsAndAlerts): ?>
<div style="color: red; font-weight: bold; font-size: 16px; font-family: arial;"><br/>
<?php echo $errorsAndAlerts; ?><br/><br/>
</div>
<?php endif ?>
<form action="" method="post" name="registrationForm">
<input type="hidden" value="1" name="formSubmit">
<tr>
<td width="550" height="25" align="left">
<?php $title = htmlspecialchars(@$_REQUEST["title"]); ?>
<label>
<span class="style1">*</span>
Mr.<input type="radio" name="title" value="Mr" id="title" <?php checkedIf($title, "Mr") ?> />
</label>
<label>
Mrs.<input type="radio" name="title" value="Mrs" id="title" <?php checkedIf($title, "Mrs") ?> />
</label>
<label>
Ms.<input type="radio" name="title" value="Ms" id="title" <?php checkedIf($title, "Ms") ?> />
</label>
<label>
Doctor <input type="radio" name="title" value="Doctor" id="title" <?php checkedIf($title, "Doctor") ?> />
</label>
<label>
Reverend<input type="radio" name="title" value="Reverend" id="title" <?php checkedIf($title, "Reverend") ?> />
</label>
<label>
Minister<input type="radio" name="title" value="Minister" id="title" <?php checkedIf($title, "Minister") ?> />
</label>
Other <input name="other" type="text" size="15" maxlength="25" value="<?php echo @$_REQUEST['other']; ?>" />
</td>
</tr>
</table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="275" height="30">
<span class="style1">*</span>
First Name
<input name="firstname" type="text" size="26" value="<?php echo @$_REQUEST['firstname']; ?>" />
</td>
<td width="275" height="30" align="left">
<span class="style1">*</span>
Last Name
<input name="lastname" type="text" size="26" value="<?php echo @$_REQUEST['lastname']; ?>" />
</td>
</tr>
<tr>
<td height="30" colspan="2">
Home Address<input name="address" type="text" size="64" value="<?php echo @$_REQUEST['address']; ?>" />
</td>
</tr>
<tr>
<td width="275" height="30">
City
<input name="city" type="text" size="33" value="<?php echo @$_REQUEST['city']; ?>" />
</td>
<td width="275" height="30">
State
<input name="state" type="text" size="6" value="<?php echo @$_REQUEST['state']; ?>" />
Zip
<input name="zip" type="text" size="21" value="<?php echo @$_REQUEST['zip']; ?>" />
</td>
</tr>
<tr>
<td width="275" height="30">
<span class="style1">*</span>
Cell Phone
<input name="cellphone" type="text" size="25" value="<?php echo @$_REQUEST['cellphone']; ?>" />
</td>
<td width="275" height="30">
Home Phone
<input name="homephone" type="text" size="25" value="<?php echo @$_REQUEST['homephone']; ?>" />
</td>
</tr>
<tr>
<td height="30" colspan="2">
<span class="style1">*</span>
Email Address
<input name="email" type="text" size="64" value="<?php echo @$_REQUEST['email']; ?>" />
</td>
</tr>
<tr>
<td width="275" height="30">
Facebook
<input name="facebook" type="text" size="20" value="<?php echo @$_REQUEST['facebook']; ?>" />
</td>
<td width="275" height="30">
Twitter
<input name="twitter" type="text" size="20" value="<?php echo @$_REQUEST['twitter']; ?>" />
</td>
</tr>
</table>
</table>
<br/>
<!-- Additional Registrants start here -->
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="4">
<strong>
Additional Registrant(s): Please note $69 per person
</strong>
</td>
</tr>
</table>
<br/>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
Number of Additional Registrants
<?php $numberOfAdditionalRegistrants = htmlspecialchars(@$_REQUEST["numberOfAdditionalRegistrants"]); ?>
<select name="numberOfAdditionalRegistrants" onchange="document.registrationForm.updateRegistrantsOnly.value = '1'; document.registrationForm.submit();">
<option value="">None</option>
<option value="1" <?php selectedIf($numberOfAdditionalRegistrants, "1") ?> >1</option>
<option value="2" <?php selectedIf($numberOfAdditionalRegistrants, "2") ?> >2</option>
<option value="3" <?php selectedIf($numberOfAdditionalRegistrants, "3") ?> >3</option>
<option value="4" <?php selectedIf($numberOfAdditionalRegistrants, "4") ?> >4</option>
<option value="5" <?php selectedIf($numberOfAdditionalRegistrants, "5") ?> >5</option>
<option value="6" <?php selectedIf($numberOfAdditionalRegistrants, "6") ?> >6</option>
<option value="7" <?php selectedIf($numberOfAdditionalRegistrants, "7") ?> >7</option>
<option value="8" <?php selectedIf($numberOfAdditionalRegistrants, "8") ?> >8</option>
<option value="9" <?php selectedIf($numberOfAdditionalRegistrants, "9") ?> >9</option>
<option value="10" <?php selectedIf($numberOfAdditionalRegistrants, "10") ?> >10</option>
</select>
<input type="hidden" value="" name="updateRegistrantsOnly" id="updateRegistrantsOnly">
</td>
</tr>
</table>
<br/>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<?php for($i=1; $i <= @$_REQUEST['numberOfAdditionalRegistrants']; $i++): ?>
<tr>
<td>
<strong>
Registrant <?php echo $i; ?>
</strong>
</td>
</tr>
<tr>
<td width="120" height="50">
First Name
<input name="reg<?php echo $i ?>firstname" type="text" size="14" value="<?php echo @$_REQUEST["reg". $i ."firstname"]; ?>" />
</td>
<td width="120" height="50">
Last Name
<input name="reg<?php echo $i ?>lastname" type="text" size="14" value="<?php echo @$_REQUEST["reg". $i ."lastname"]; ?>" />
</td>
<td width="120" height="50">
Cellphone
<input name="reg<?php echo $i ?>cellphone" type="text" size="14" value="<?php echo @$_REQUEST["reg". $i ."cellphone"]; ?>" />
</td>
<td width="190" height="50">
Email
<input name="reg<?php echo $i ?>email" type="text" size="23" value="<?php echo @$_REQUEST["reg". $i ."email"]; ?>" />
</td>
</tr>
<?php endfor ?>
</table>
<!-- Additional Registrants end here -->
<br/>
<table width="550" align="center">
<?php $payment = htmlspecialchars(@$_REQUEST["payment"]); ?>
<tr>
<td>
<strong>Payment Method</strong>
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" name="payment_method" value="Paypal" id="payment_method" <?php checkedIf($payment, "Paypal") ?> />
Paypal
</label>
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" name="payment_method" value="Mail Payment" id="payment_method" <?php checkedIf($payment, "Mail Payment") ?> />
Mail Payment
</label>
</td>
</tr>
</table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<input name="submitregistration" type="submit" value="Submit Registration" />
</td>
</tr>
</table>
</form>
<!-- Conference Registration Form Ends Here -->
How do I get this to post without the space on the page?
http://www.intensifynow.com/intensifyform_test_view.php
Here is the code:
<!-- Conference Registration Form Starts Here -->
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<h2>
Intensify Women's Conference Registration
</h2>
<?php foreach ($conference_registrationRecords as $record): ?>
<?php echo $record['content'] ?><br/>
<hr/>
<?php endforeach ?>
<p>*required fileds</p>
<?php if (@$errorsAndAlerts): ?>
<div style="color: red; font-weight: bold; font-size: 16px; font-family: arial;"><br/>
<?php echo $errorsAndAlerts; ?><br/><br/>
</div>
<?php endif ?>
<form action="" method="post" name="registrationForm">
<input type="hidden" value="1" name="formSubmit">
<tr>
<td width="550" height="25" align="left">
<?php $title = htmlspecialchars(@$_REQUEST["title"]); ?>
<label>
<span class="style1">*</span>
Mr.<input type="radio" name="title" value="Mr" id="title" <?php checkedIf($title, "Mr") ?> />
</label>
<label>
Mrs.<input type="radio" name="title" value="Mrs" id="title" <?php checkedIf($title, "Mrs") ?> />
</label>
<label>
Ms.<input type="radio" name="title" value="Ms" id="title" <?php checkedIf($title, "Ms") ?> />
</label>
<label>
Doctor <input type="radio" name="title" value="Doctor" id="title" <?php checkedIf($title, "Doctor") ?> />
</label>
<label>
Reverend<input type="radio" name="title" value="Reverend" id="title" <?php checkedIf($title, "Reverend") ?> />
</label>
<label>
Minister<input type="radio" name="title" value="Minister" id="title" <?php checkedIf($title, "Minister") ?> />
</label>
Other <input name="other" type="text" size="15" maxlength="25" value="<?php echo @$_REQUEST['other']; ?>" />
</td>
</tr>
</table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="275" height="30">
<span class="style1">*</span>
First Name
<input name="firstname" type="text" size="26" value="<?php echo @$_REQUEST['firstname']; ?>" />
</td>
<td width="275" height="30" align="left">
<span class="style1">*</span>
Last Name
<input name="lastname" type="text" size="26" value="<?php echo @$_REQUEST['lastname']; ?>" />
</td>
</tr>
<tr>
<td height="30" colspan="2">
Home Address<input name="address" type="text" size="64" value="<?php echo @$_REQUEST['address']; ?>" />
</td>
</tr>
<tr>
<td width="275" height="30">
City
<input name="city" type="text" size="33" value="<?php echo @$_REQUEST['city']; ?>" />
</td>
<td width="275" height="30">
State
<input name="state" type="text" size="6" value="<?php echo @$_REQUEST['state']; ?>" />
Zip
<input name="zip" type="text" size="21" value="<?php echo @$_REQUEST['zip']; ?>" />
</td>
</tr>
<tr>
<td width="275" height="30">
<span class="style1">*</span>
Cell Phone
<input name="cellphone" type="text" size="25" value="<?php echo @$_REQUEST['cellphone']; ?>" />
</td>
<td width="275" height="30">
Home Phone
<input name="homephone" type="text" size="25" value="<?php echo @$_REQUEST['homephone']; ?>" />
</td>
</tr>
<tr>
<td height="30" colspan="2">
<span class="style1">*</span>
Email Address
<input name="email" type="text" size="64" value="<?php echo @$_REQUEST['email']; ?>" />
</td>
</tr>
<tr>
<td width="275" height="30">
<input name="facebook" type="text" size="20" value="<?php echo @$_REQUEST['facebook']; ?>" />
</td>
<td width="275" height="30">
<input name="twitter" type="text" size="20" value="<?php echo @$_REQUEST['twitter']; ?>" />
</td>
</tr>
</table>
</table>
<br/>
<!-- Additional Registrants start here -->
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="4">
<strong>
Additional Registrant(s): Please note $69 per person
</strong>
</td>
</tr>
</table>
<br/>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
Number of Additional Registrants
<?php $numberOfAdditionalRegistrants = htmlspecialchars(@$_REQUEST["numberOfAdditionalRegistrants"]); ?>
<select name="numberOfAdditionalRegistrants" onchange="document.registrationForm.updateRegistrantsOnly.value = '1'; document.registrationForm.submit();">
<option value="">None</option>
<option value="1" <?php selectedIf($numberOfAdditionalRegistrants, "1") ?> >1</option>
<option value="2" <?php selectedIf($numberOfAdditionalRegistrants, "2") ?> >2</option>
<option value="3" <?php selectedIf($numberOfAdditionalRegistrants, "3") ?> >3</option>
<option value="4" <?php selectedIf($numberOfAdditionalRegistrants, "4") ?> >4</option>
<option value="5" <?php selectedIf($numberOfAdditionalRegistrants, "5") ?> >5</option>
<option value="6" <?php selectedIf($numberOfAdditionalRegistrants, "6") ?> >6</option>
<option value="7" <?php selectedIf($numberOfAdditionalRegistrants, "7") ?> >7</option>
<option value="8" <?php selectedIf($numberOfAdditionalRegistrants, "8") ?> >8</option>
<option value="9" <?php selectedIf($numberOfAdditionalRegistrants, "9") ?> >9</option>
<option value="10" <?php selectedIf($numberOfAdditionalRegistrants, "10") ?> >10</option>
</select>
<input type="hidden" value="" name="updateRegistrantsOnly" id="updateRegistrantsOnly">
</td>
</tr>
</table>
<br/>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<?php for($i=1; $i <= @$_REQUEST['numberOfAdditionalRegistrants']; $i++): ?>
<tr>
<td>
<strong>
Registrant <?php echo $i; ?>
</strong>
</td>
</tr>
<tr>
<td width="120" height="50">
First Name
<input name="reg<?php echo $i ?>firstname" type="text" size="14" value="<?php echo @$_REQUEST["reg". $i ."firstname"]; ?>" />
</td>
<td width="120" height="50">
Last Name
<input name="reg<?php echo $i ?>lastname" type="text" size="14" value="<?php echo @$_REQUEST["reg". $i ."lastname"]; ?>" />
</td>
<td width="120" height="50">
Cellphone
<input name="reg<?php echo $i ?>cellphone" type="text" size="14" value="<?php echo @$_REQUEST["reg". $i ."cellphone"]; ?>" />
</td>
<td width="190" height="50">
<input name="reg<?php echo $i ?>email" type="text" size="23" value="<?php echo @$_REQUEST["reg". $i ."email"]; ?>" />
</td>
</tr>
<?php endfor ?>
</table>
<!-- Additional Registrants end here -->
<br/>
<table width="550" align="center">
<?php $payment = htmlspecialchars(@$_REQUEST["payment"]); ?>
<tr>
<td>
<strong>Payment Method</strong>
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" name="payment_method" value="Paypal" id="payment_method" <?php checkedIf($payment, "Paypal") ?> />
Paypal
</label>
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" name="payment_method" value="Mail Payment" id="payment_method" <?php checkedIf($payment, "Mail Payment") ?> />
Mail Payment
</label>
</td>
</tr>
</table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<input name="submitregistration" type="submit" value="Submit Registration" />
</td>
</tr>
</table>
</form>
<!-- Conference Registration Form Ends Here -->
How do I get this to post without the space on the page?
Re: [maja13] Spacing on Page
By robin - April 4, 2011
Hey,
Many
are appearing, and that's what is causing the long space. It seems to be caused by this block of code:
Is there possibly many records in your conference_registration section that have no content? You could try adding:
to your load records code.
Otherwise you could just remove the
if that's easier.
Hope that helps,
Robin
Many
<br/><hr/>
are appearing, and that's what is causing the long space. It seems to be caused by this block of code:
<?php foreach ($conference_registrationRecords as $record): ?>
<?php echo $record['content'] ?><br/><hr/>
<?php endforeach ?>
Is there possibly many records in your conference_registration section that have no content? You could try adding:
'limit' => '1',
to your load records code.
Otherwise you could just remove the
<br/><hr/>
if that's easier.
Hope that helps,
Robin
Robin
Programmer
interactivetools.com
Programmer
interactivetools.com
Re: [maja13] Spacing on Page
By Jason - April 4, 2011
Hi,
From what I can see on your page, this is the part of the code that's the problem:
This is outputting the content of every record from $conference_registrationsRecords. If you look at the page source on that page, you'll notice a large number of <hr/><br/> tags, which is what it causing this space.
It looks like you probably only want to output a single record here, not all of them.
Hope this helps.
From what I can see on your page, this is the part of the code that's the problem:
<?php foreach ($conference_registrationRecords as $record): ?>
<?php echo $record['content'] ?><br/>
<hr/>
<?php endforeach ?>
This is outputting the content of every record from $conference_registrationsRecords. If you look at the page source on that page, you'll notice a large number of <hr/><br/> tags, which is what it causing this space.
It looks like you probably only want to output a single record here, not all of them.
Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Spacing on Page
By maja13 - April 4, 2011
That fixed it! Thank you Robin and Jason. Knew some part of the code was causing every record to load but wasn't sure what.