Form formatting

deltronzero 22 Jun, 2009
HI

I had a form i created using an older version of CF and it displayed two drop down boxes on the same line. Before upgrading, i saved my html code (as i knew it wouldnt work with the new version).

After i upgraded to the latest version and pasted in my existing form code, the form works fine but it has lost some formatting.

Instead of certain items appearing two to a line, everything now appears on an individual line, thus making the form quite long.

Here is the code for two items that did appear on the same line, but not appear on separate:

<?php
// Get user-information from Joomla
$user = &JFactory::getUser();
?>
<div class="form_item">
   <div class="form_element cf_textbox">
      <label class="cf_label" for="name">Name:</label>
      <input type="text" name="name" id="name" size="20"
maxlength="40" value="<?= $user->username; ?>" />
      <a class="tooltiplink" onclick="return false;">
         <img height="16" border="0" width="16" class="tooltipimg" src="components/com_chronocontact/css/images/tooltip.png"/>
      </a>
      <div class="tooltipdiv">Name :: this is auto-filled from your profile.</div>
   </div>
  
</div>
<div class="form_item">
   <div class="form_element cf_textbox">
      <label class="cf_label" for="email">Email:</label>
      <input type="text" name="email" id="email" size="20"
maxlength="40" value="<?= $user->email; ?>" />
      <a class="tooltiplink" onclick="return false;">
         <img height="16" border="0" width="16" class="tooltipimg" src="components/com_chronocontact/css/images/tooltip.png"/>
      </a>
      <div class="tooltipdiv">Email :: this is auto-filled from your profile.  Make sure that this is a valid email address.</div>
   </div>
   <div class='clear'> </div>
</div>


Any Ideas?

EDIT: i've fixed the vertical layout (i.e labels starting in the same spot)using style (a new requirement in the latest version), but i cant get 2 items to display on one line (even after replacing clear with cfclear).
Max_admin 22 Jun, 2009
Hi,

try to use a table to put two fields together in the same row!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
deltronzero 22 Jun, 2009
i feel so stupid 😶

tables worked a treat 😀
This topic is locked and no more replies can be posted.