Hi
I want to place two fields on a single row in a form using survey module instead of one under the other as it is by default. How can this be achieved ?

thanks in advance

jp

Comments

kjp’s picture

Any hint about where I should look ?

saraic’s picture

Can you not just change your CSS to be inline? That should do the trick ...

kjp’s picture

Thanks
Ill give this a try but it seems difficult since I can adress that only by calling classes. Items dont have their unique ID but I just need two fields out of ten to lie on the same row. Any (easy !) way to give those IDs instead or in addition of class ?

kjp’s picture

This HTML chunk of my form works perfectly in Firefox editing tool :

<div class="form-item" id="form-item3">
 <label for="edit-field-23">Titre du document:</label>
 <input maxlength="30" class="form-text" name="edit[field-23]" id="edit-field-23" size="30" value="" type="text">
</div>
<div class="form-item" id="form-item2">
 <label for="edit-field-21">Quantité:</label>
 <input maxlength="2" class="form-text" name="edit[field-21]" id="edit-field-21" size="2" value="" type="text">
</div>
<div class="form-item" id="form-item1">
 <label for="edit-field-24">Prix unitaire:</label>
 <input maxlength="5" class="form-text" name="edit[field-24]" id="edit-field-24" size="5" value="" type="text">
 <div class="description">Des frais d'expédition sont facturés pour tous les envois.
Les prix sont sujets à changement sans préavis. </div>
</div>

Unfortunetely, default Drupal output is that :

<div class="form-item">
 <label for="edit-field-23">Titre du document:</label><br>
 <input maxlength="64" class="form-text" name="edit[field-23]" id="edit-field-23" size="64" value="" type="text">
</div>
<div class="form-item">
 <label for="edit-field-21">Quantité:</label><br>
 <input maxlength="64" class="form-text" name="edit[field-21]" id="edit-field-21" size="64" value="" type="text">
</div>
<div class="form-item">
 <label for="edit-field-24">Prix unitaire:</label><br>
 <input maxlength="64" class="form-text" name="edit[field-24]" id="edit-field-24" size="64" value="" type="text">
 <div class="description">Des frais d'expédition sont facturés pour tous les envois.
Les prix sont sujets à changement sans préavis. </div>
</div>

I am okay with everything else. Basically, I just need to give a specific ID to three text fields and remove the br tag.
How can I get Drupal to do just that ?