Page 1 of 1

Hide none in radio button

Posted: 2020-12-22 10:34
by balfons
Hi everybody!

I'm trying to hide the value "none" of a radio button by making this field required. Ok, it works, but when I make it required I can't put it inside a custom tab.

When this field is not required I can put it in a custom tab. Any idea for hiding the value "none" and putting the field in a custom tab?

Thanks in advance!

Re: Hide none in radio button

Posted: 2020-12-22 12:02
by ksabra
To hide none, make the field required
To move the field to a custom tab, add 1 to the field ID

Code: Select all

$j('#field1').parents('.form-group').appendTo('#custom_tab');

Re: Hide none in radio button

Posted: 2020-12-22 12:04
by balfons
Thanks! I'll try it!

Re: Hide none in radio button

Posted: 2020-12-22 15:38
by balfons
Hi again!

I have tried your solution and it works ... but the field only is shown into the tab when an option is selected. When no option is checked, the fiels is out of the tab.

I just put the coode you wrote after the definition of the tab.

thanks,

Re: Hide none in radio button

Posted: 2020-12-22 17:34
by pbottcher
Hi,

can you explain how you create your custom tab.

Re: Hide none in radio button

Posted: 2020-12-23 07:20
by balfons
Hi!

Here is how I defined my tab. The radio-button field is "linked_to_test".

var tab33 = dv.addTab( "test", "Test", "th-list" )
.add("linked_to_test");

$j('#linked_to_test').parents('.form-group').appendTo('#tab33');

When I add a new item to the list, the tab is empty. Then, I choose a value, save the item and, after this, the field moves into the tab.

Thanks for helping

Re: Hide none in radio button

Posted: 2020-12-23 08:14
by pbottcher
Thanks for clarification.
As it seems you are using the HelperLibrary. So it is not possible to help you directly in the "normal" forum. Please post this question to the
viewforum.php?f=13 subforum

Sorry that I cannot help further.

Re: Hide none in radio button

Posted: 2020-12-23 10:27
by balfons
Thanks, I'll repost this question to the other forum.