Hide none in radio button and put the field in a custom tab

This sub-forum is for discussing all topics related to AppGini Helper JavaScript Library, provided by bizzworxx as a third-party AppGini plugin.
Post Reply
balfons
Veteran Member
Posts: 91
Joined: 2018-10-22 15:27

Hide none in radio button and put the field in a custom tab

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

Hi everybody!

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

I posted this question in another forum viewtopic.php?f=4&t=4074&p=15792#p15792 and a user suggested adding this:

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

So I defined my tab like this:

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

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

What happens now is that the field "linked_to_test" only moves to "tab33" when I choose an option (A, B or C) and save the register.

Any ideas?

Thanks in advance

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

Re: Hide none in radio button and put the field in a custom tab

Post by balfons » 2021-01-08 10:46

Hi!

I finally solved this issue using the Multi-Column Layout. Here goes my code:

var row = dv.addLayout([12, 0])
.add(1, ["linked_to_test"]);

dv.addTab("test", "Test", "th-list")
.add (["id", "code"])
.add (row);

So I create a "false" multi-column, put the radio button field inside and then I add the multi-column to the tab. Maybe not the most accurate solution but it works.

Hope it helps if anyone needs it

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1814
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Hide none in radio button and put the field in a custom tab

Post by jsetzer » 2021-01-08 11:24

Thanks for sharing your solution! Well done!
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

Post Reply