Hide none in radio button

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
balfons
Veteran Member
Posts: 91
Joined: 2018-10-22 15:27

Hide none in radio button

Post by balfons » 2020-12-22 10:34

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!

ksabra
Posts: 8
Joined: 2020-05-26 11:58

Re: Hide none in radio button

Post by ksabra » 2020-12-22 12:02

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');

balfons
Veteran Member
Posts: 91
Joined: 2018-10-22 15:27

Re: Hide none in radio button

Post by balfons » 2020-12-22 12:04

Thanks! I'll try it!

balfons
Veteran Member
Posts: 91
Joined: 2018-10-22 15:27

Re: Hide none in radio button

Post by balfons » 2020-12-22 15:38

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,

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1638
Joined: 2018-04-01 10:12

Re: Hide none in radio button

Post by pbottcher » 2020-12-22 17:34

Hi,

can you explain how you create your custom tab.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

balfons
Veteran Member
Posts: 91
Joined: 2018-10-22 15:27

Re: Hide none in radio button

Post by balfons » 2020-12-23 07:20

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

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1638
Joined: 2018-04-01 10:12

Re: Hide none in radio button

Post by pbottcher » 2020-12-23 08:14

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.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

balfons
Veteran Member
Posts: 91
Joined: 2018-10-22 15:27

Re: Hide none in radio button

Post by balfons » 2020-12-23 10:27

Thanks, I'll repost this question to the other forum.

Post Reply