Jump to content

Modify Address fields Input to add an ID


jmauclair

Recommended Posts

Hi guys,

 

I'm trying to edit the address fields input to add an id to each one of them 

<div class="js-address-form"> 

 <section class="form-fields">

 <!-- begin _partials/form-fields.tpl -->

 <div class="form-group row "> <label class="col-md-3 form-control-label required"> Prénom </label> <div class="col-md-6">

 <input class="form-control" name="firstname" type="text" value="LEBG" maxlength="255" required=""> 

 

 </div>

 <div class="col-md-3 form-control-comment"> </div> </div> 

<!-- end _partials/form-fields.tpl -->

 <!-- begin _partials/form-fields.tpl -->

 <div class="form-group row "> <label class="col-md-3 form-control-label required"> Nom </label> <div class="col-md-6">

 <input class="form-control" name="lastname" type="text" value="CMOI" maxlength="255" required=""> 

 

 </div>

 <div class="col-md-3 form-control-comment"> </div> </div> 

<!-- end _partials/form-fields.tpl -->

 <!-- begin _partials/form-fields.tpl -->

 <div class="form-group row "> <label class="col-md-3 form-control-label"> Société </label> <div class="col-md-6">

 <input class="form-control" name="company" type="text" value="" maxlength="255"> 

 

 </div>

 <div class="col-md-3 form-control-comment"> Optionnel </div> </div> 

<!-- end _partials/form-fields.tpl -->

 <!-- begin _partials/form-fields.tpl -->

 <div class="form-group row "> <label class="col-md-3 form-control-label"> Numéro de TVA </label> <div class="col-md-6">

 <input class="form-control" name="vat_number" type="text" value=""> 

 

 </div>

 <div class="col-md-3 form-control-comment"> Optionnel </div> </div> 

<!-- end _partials/form-fields.tpl -->

 <!-- begin _partials/form-fields.tpl -->

 <div class="form-group row "> <label class="col-md-3 form-control-label required"> Adresse </label> <div class="col-md-6">

 <input class="form-control" name="address1" type="text" value="" maxlength="128" required=""> 

 

 </div>

 <div class="col-md-3 form-control-comment"> </div> </div> 

<!-- end _partials/form-fields.tpl -->

 <!-- begin _partials/form-fields.tpl -->

 <div class="form-group row "> <label class="col-md-3 form-control-label"> Complément d'adresse </label> <div class="col-md-6">

 <input class="form-control" name="address2" type="text" value="" maxlength="128"> 

 

 </div>

 <div class="col-md-3 form-control-comment"> Optionnel </div> </div> 

<!-- end _partials/form-fields.tpl -->

 <!-- begin _partials/form-fields.tpl -->

 <div class="form-group row "> <label class="col-md-3 form-control-label required"> Code postal </label> <div class="col-md-6">

 <input class="form-control" name="postcode" type="text" value="" maxlength="12" required=""> 

 

 </div>

 <div class="col-md-3 form-control-comment"> </div> </div> 

<!-- end _partials/form-fields.tpl -->

 <!-- begin _partials/form-fields.tpl -->

 <div class="form-group row "> <label class="col-md-3 form-control-label required"> Ville </label> <div class="col-md-6">

 <input class="form-control" name="city" type="text" value="" maxlength="64" required=""> 

 

 </div>

 <div class="col-md-3 form-control-comment"> </div> </div> 

<!-- end _partials/form-fields.tpl -->

 <!-- begin _partials/form-fields.tpl -->

 <div class="form-group row "> <label class="col-md-3 form-control-label required"> Pays </label> <div class="col-md-6">

 <select class="form-control form-control-select js-country" name="id_country" required=""> <option value="" disabled="" selected="">-- Choisissez s'il vous plaît --</option> <option value="1">Allemagne</option> <option value="40">Andorra</option> <option value="3">Belgique</option> <option value="8" selected="">France</option> <option value="10">Italy</option> <option value="148">Monaco</option> <option value="6">Spain</option> </select> 

 

 </div>

 <div class="col-md-3 form-control-comment"> </div> </div> 

<!-- end _partials/form-fields.tpl -->

 <!-- begin _partials/form-fields.tpl -->

 <div class="form-group row "> <label class="col-md-3 form-control-label"> Téléphone </label> <div class="col-md-6">

 <input class="form-control" name="phone" type="tel" value="" maxlength="32"> 

 

 </div>

 <div class="col-md-3 form-control-comment"> Optionnel </div> </div> 

<!-- end _partials/form-fields.tpl -->

 <input type="hidden" name="saveAddress" value="delivery"> <div class="form-group row"> <div class="col-md-9 col-md-offset-3"> <input name="use_same_address" id="use_same_address" type="checkbox" value="1" checked=""> <label for="use_same_address">Utilisez également cette adresse pour la facture</label> </div> </div> </section> 

 <footer class="form-footer clearfix"> <input type="hidden" name="submitAddress" value="1"> <button type="submit" class="continue btn btn-primary float-xs-right" name="confirm-addresses" value="1"> Continuer </button> </footer> 

 </div>

I would need something like that :

 <div class="form-group row "> <label class="col-md-3 form-control-label required"> Nom </label> <div class="col-md-6">

 <input class="form-control" id="whatyouwant" name="lastname" type="text" value="PRESTA" maxlength="255" required=""> 

 

 </div>

But I can't find where can I edit the form rendering to add the : id="whatyouwant"

 

I've been searching through Address.php, CustomerAddress, ect, every classe that contain Address in it lol.

 

Link to comment
Share on other sites

  • razaro changed the title to Modify Address fields Input to add an ID

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...