1. adil
  2. Support
  3. Sunday, December 30 2018, 02:22 PM
placeholder not showing what i made in field setting but showing always the same value "Type or select some options" i all fields. this problem happen in field type "select"
Attachments (1)
References
  1. http://www.bricodar.com/index.php/fr/
admin Accepted Answer
Admin
Hi,
it works so in the search mode, placeholder is valid only for registration and edit profile.

Related to your previous reply, we propose you a solution for your needs, try to add this javascript code to your template:
jQuery(document).ready(function(){
jQuery('.jsn_search select[multiple="multiple"]').chosen('destroy');
jQuery('.jsn_search select[multiple="multiple"]').addClass('no_multiple').removeAttr('multiple');
jQuery('#jform_metier').prepend('<option value="">--- Metier ---</option>').val(""); /* Placeholder 1 */
jQuery('#jform_provinces').prepend('<option value="">--- Ville ---</option>').val("");; /* Placeholder 2 */
jQuery('#jform_communes').prepend('<option value="">--- Secteur ---</option>').val("");; /* Placeholder 3 */
jQuery('.jsn_search_module select.no_multiple').chosen();
});


This code should add placeholder and transform multiple select into single select ;)
  1. more than a month ago
  2. Support
  3. # 1
adil Accepted Answer
where can i put this Js?
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
Hi,
custom CSS (style) and JS (javascript) code should be managed by template, so you can append above code in file called /templates/etplumbing/js/custom.js

NOTE: refresh your browser cache
  1. more than a month ago
  2. Support
  3. # 3
adil Accepted Answer
thanks it works perfect
  1. more than a month ago
  2. Support
  3. # 4
adil Accepted Answer
plz can you adjust javascript code to change placeholder value to match with multilanguage website
i have two language "fr" and "ar"
  1. more than a month ago
  2. Support
  3. # 5
admin Accepted Answer
Admin
of course, try with this
jQuery(document).ready(function(){
jQuery('.jsn_search select[multiple="multiple"]').chosen('destroy');
jQuery('.jsn_search select[multiple="multiple"]').addClass('no_multiple').removeAttr('multiple');
jQuery('body.fr-fr #jform_metier').prepend('<option value="">--- Metier ---</option>').val(""); /* Placeholder 1 FR */
jQuery('body.fr-fr #jform_provinces').prepend('<option value="">--- Ville ---</option>').val("");; /* Placeholder 2 FR */
jQuery('body.fr-fr #jform_communes').prepend('<option value="">--- Secteur ---</option>').val("");; /* Placeholder 3 FR */
jQuery('body.en-gb #jform_metier').prepend('<option value="">--- Metier ---</option>').val(""); /* Placeholder 1 EN */
jQuery('body.en-gb #jform_provinces').prepend('<option value="">--- Ville ---</option>').val("");; /* Placeholder 2 EN */
jQuery('body.en-gb #jform_communes').prepend('<option value="">--- Secteur ---</option>').val("");; /* Placeholder 3 EN */
jQuery('.jsn_search_module select.no_multiple').chosen();
});
  1. more than a month ago
  2. Support
  3. # 6
adil Accepted Answer
thanks, it works perfectely
  1. more than a month ago
  2. Support
  3. # 7
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.