I'm sorry but it does not workI have just tried and it works, see screenshot, if I select at least one checkbox the text field value will be "ok", otherwise it will be empty.
my field is a text field. no problem !?Yes, no problem. But it need to be required.
Where can I put the message "you have to select a category ...""This could be the name of your text field, basically if you does not select any checkbox the text field will be empty, so it return a error like "Invalid Field: you have to select a category ..." (this is the Joomla error message "Invalid Field:" + field name)
jQuery(window).load(function(){
checkoptions();
jQuery('#jform_check_options').closest('fieldset').find('input[type="checkbox"]').change(function(){
checkoptions();
});
});
function checkoptions(){
if(!jQuery('#jform_check_options').closest('fieldset').find('input[type="checkbox"]:checked').length){
jQuery('#jform_check_options').val('');
}
else {
jQuery('#jform_check_options').val('ok');
}
}
.control-group.check_options-group {display:none !important}
var tab_number = 1; // Set here your tab number 0,1,2,3....
jQuery(window).load(function(){
checkoptions();
jQuery('#member-registration .jsn-form-fieldset[data-index="'+tab_number+'"] input[type="checkbox"],#member-profile .jsn-form-fieldset[data-index="'+tab_number+'"] input[type="checkbox"]').change(function(){
checkoptions();
});
});
function checkoptions(){
if(!jQuery('#member-registration .jsn-form-fieldset[data-index="'+tab_number+'"] input[type="checkbox"]:checked,#member-profile .jsn-form-fieldset[data-index="'+tab_number+'"] input[type="checkbox"]:checked').length){
jQuery('#jform_check_options').val('');
}
else {
jQuery('#jform_check_options').val('ok');
}
}
II / a bit out of your support, but could you help me start to force members to check at least 1 field from several fields checkboxlistUnfortunately this is not possible with a simple way, anyway tomorrow I will try to develop a Javascript code that fit this your need
(picture 3)?
Indeed, nobody does it :-(
Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.
Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.
Before you post: read the documentation and search the forums for an answer to your question.
When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).
Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.
Language: only English
Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.
Our site uses non fat, delicious cookies which help us improve your user experience. You can read more about it in our Legal page.