1. Michel Ollivier
  2. Sherlock Holmes
  3. Newbie area
  4. Friday, 26 June 2015
  5.  Subscribe via email
Hi Daniel,

Concerning edit form view, fields are displayed by default with label class .col-sm-2 and input .col-sm-10. Is there a way to change this?

For exemple in custom field override

					
<?php if($this->form->getGroup('customfields')) : ?>
<?php foreach($this->form->getGroup('customfields') as $custom) : ?>
<div class="form-group">
<div class="col-sm-2">
<?php echo $custom->label; ?>
</div>
<div class="col-sm-10">
<?php echo $custom->input; ?>
</div>
</div>
<?php endforeach; ?>
<?php endif; ?>


generates


<div id="custom-fields">
<div class="form-group">
<div class="col-sm-2">
<label class="required" for="jform_customfields_hideaddress" id="jform_customfields_hideaddress-lbl">
Hide Address<span class="star"> *</span></label> </div>
<div class="col-sm-10">
<select aria-required="true" required="" class="form-control required" name="jform[customfields][hideaddress]" id="jform_customfields_hideaddress">
<option value="Yes">Yes</option>
<option selected="selected" value="No">No</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-2">
<label class="required" for="jform_customfields_hidemap" id="jform_customfields_hidemap-lbl">
Hide Map<span class="star"> *</span></label> </div>
<div class="col-sm-10">
<select aria-required="true" required="" class="form-control required" name="jform[customfields][hidemap]" id="jform_customfields_hidemap">
<option value="Yes">Yes</option>
<option selected="selected" value="No">No</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-2">
<label class="required" for="jform_customfields_anonymous" id="jform_customfields_anonymous-lbl">
Anonymous<span class="star"> *</span></label> </div>
<div class="col-sm-10">
<select aria-required="true" required="" class="form-control required" name="jform[customfields][anonymous]" id="jform_customfields_anonymous">
<option value="Yes">Yes</option>
<option selected="selected" value="No">No</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-2">
<label class="" for="jform_customfields_weekprice" id="jform_customfields_weekprice-lbl">
Week Price</label> </div>
<div class="col-sm-10">
<input type="text" class="form-control" value="" id="jform_customfields_weekprice" name="jform[customfields][weekprice]"> </div>
</div>
<div class="form-group">
<div class="col-sm-2">
<label class="" for="jform_customfields_dailyprice" id="jform_customfields_dailyprice-lbl">
Daily Price</label> </div>
<div class="col-sm-10">
<input type="text" class="form-control" value="" id="jform_customfields_dailyprice" name="jform[customfields][dailyprice]"> </div>
</div>
<div class="form-group">
<div class="col-sm-2">
<label class="required" for="jform_customfields_bedrooms" id="jform_customfields_bedrooms-lbl">
Bedrooms<span class="star"> *</span></label> </div>
<div class="col-sm-10">
<select aria-required="true" required="" class="form-control required" name="jform[customfields][bedrooms]" id="jform_customfields_bedrooms">
<option value="1">1</option>
<option selected="selected" value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-2">
<label class="required" for="jform_customfields_bathrooms" id="jform_customfields_bathrooms-lbl">
Bathrooms<span class="star"> *</span></label> </div>
<div class="col-sm-10">
<select aria-required="true" required="" class="form-control required" name="jform[customfields][bathrooms]" id="jform_customfields_bathrooms">
<option selected="selected" value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-2">
<label class="" for="jform_customfields_petsallowed" id="jform_customfields_petsallowed-lbl">
Pets Allowed</label> </div>
<div class="col-sm-10">
<select class="form-control" name="jform[customfields][petsallowed]" id="jform_customfields_petsallowed">
<option value="Yes">Yes</option>
<option selected="selected" value="No">No</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-2">
<label class="required" for="jform_customfields_currency" id="jform_customfields_currency-lbl">
Currency<span class="star"> *</span></label> </div>
<div class="col-sm-10">
<select aria-required="true" required="" class="form-control required" name="jform[customfields][currency]" id="jform_customfields_currency">
<option selected="selected" value="USD">USD</option>
<option value="EUR">EUR</option>
<option value="GBP">GBP</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-2">
<label class="required" for="jform_customfields_minimumstay" id="jform_customfields_minimumstay-lbl">
Minimum Stay<span class="star"> *</span></label> </div>
<div class="col-sm-10">
<select aria-required="true" required="" class="form-control required" name="jform[customfields][minimumstay]" id="jform_customfields_minimumstay">
<option value="3 days">3 days</option>
<option selected="selected" value="1 week">1 week</option>
<option value="2 weeks">2 weeks</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-2">
<label class="" for="jform_customfields_bookingcom" id="jform_customfields_bookingcom-lbl">
booking.com</label> </div>
<div class="col-sm-10">
<input type="url" value="" id="jform_customfields_bookingcom" class="form-control" name="jform[customfields][bookingcom]"> </div>
</div>
<div class="form-group">
<div class="col-sm-2">
<label class="" for="jform_customfields_homeawaycom" id="jform_customfields_homeawaycom-lbl">
homeaway.com</label> </div>
<div class="col-sm-10">
<input type="url" value="" id="jform_customfields_homeawaycom" class="form-control" name="jform[customfields][homeawaycom]"> </div>
</div>
</div>


I would like to place more precisely form elements in a responsive grid. On previous project I used jquery appendTo method to place fields accurately. But it's too heavy. This time, I will try server side method.

Thanks for your help;

Regards
Michel
Responses (7)


There are %s replies to this question. If you want to see them you need a valid subscription.
If you have a valid subscription, please login now.
Visit store now

Last questions

Is Ccomment still alive?
Is Ccomment still being supported? It's time for my Pro renewal but I haven't se...
0 Replies
Posted on Thursday, 14 August 2025
  • New
  • Anzeige von mehrtägigen Events auf Buchungsseite
    We have been using Matukio for quite some time now. Unfortunately, we have been ...
    3 Replies
    Posted on Sunday, 03 August 2025
    Assistance Needed – Error When Posting Comments
    Hello, I’m experiencing an issue when trying to submit a comment on my site u...
    0 Replies
    Posted on Sunday, 10 August 2025
  • New
  • Hotspots Pro 6.0.13 compatability with Joomla 5.3.
    Running Hotspots Pro 6.0.13 on Joomla 4.4.13 and want to upgrade to Joomla 5.3.1...
    2 Replies
    Posted on Friday, 04 July 2025
    some questions on Hotspots
    Hi, On Hotspots extension : 1) is it possible to add our own map layer / v...
    0 Replies
    Posted on Thursday, 03 July 2025