Hello,
I want to hide a tab named "Email" (ID and Label is the same) in a view form. If the value of the field "contact" is not "Email", it should not be displayed. I wrote
I checked jQuery("[name='Data[contact]']").val() on one entry, it was "Tel" - but the Email tab showed up all the same. How can I solve this?
Regards,
Christian
I want to hide a tab named "Email" (ID and Label is the same) in a view form. If the value of the field "contact" is not "Email", it should not be displayed. I wrote
jQuery(document).ready(function($){
if !(jQuery("[name='Data[contact]']").val() == "Email") {
jQuery("[name='Email']").style.display='none';
}
});
I checked jQuery("[name='Data[contact]']").val() on one entry, it was "Tel" - but the Email tab showed up all the same. How can I solve this?
Regards,
Christian
Please try:
Which would hide an element with name = "Email", but you need to hide the "tab", I think this may be helpful:
http://getbootstrap.com/javascript/#tabs
You need to disable ALL tabs first then activate the one you need.
Regards,
Max
jQuery("[name='Email']").css("display", "none");
Which would hide an element with name = "Email", but you need to hide the "tab", I think this may be helpful:
http://getbootstrap.com/javascript/#tabs
You need to disable ALL tabs first then activate the one you need.
Regards,
Max
I couldn't get this to work (even don't know how to disable tabs), so I just disabled all the fields in "Email" and let a message show up. Not the best, but a working solution.
Ok, just one more hint, each tab is constructed of a tab link and a tab body, so by hiding both using cSS, you will get the desired effect, you can do more tests with that!
Regards,
Max
Regards,
Max
This topic is locked and no more replies can be posted.