DMXzone Server Connect Support Product Page

Answered

How can I show hide Divs from radio button, for an update record form

Asked 30 Nov 2017 15:58:34
1
has this question
30 Nov 2017 15:58:34 Miguel Quintero posted:
I am using PHP update, I have a radio group that depending on the option clicked it should hide or show options, but I did not find any instructions on how to do this with the tool an example of this is:

Radio 1 -- Radio 2 --- Radio 3 (shows 2 fields) --- radio 4 (shows all fields)

Name field (Always shows)
text field 1 (radio 1 checked) hide if not checked
Text field 2 (radio 2 checked) hide if not checked or if (radio 3 checked)
Text field 3 (radio 3 checkd)
All fields if Radio 4 checked

I there any way to do this or do I need to write my own javascript?

Replies

Replied 30 Nov 2017 16:17:57
30 Nov 2017 16:17:57 Teodor Kuduschiev replied:
Hi Miguel,
Make sure to check the basics of dynamic attributes for App Connect: www.dmxzone.com/go/32764/dmxzone-app-connect-manual/32760/using-dynamic-attributes-in-dmxzone-app-connect
Replied 30 Nov 2017 16:34:48
30 Nov 2017 16:34:48 Miguel Quintero replied:
The issue im facing is that when I click on Add DMXzone Connect to this page it says: Your current page is using HTML5 Data Bindings, If you want to use DMXzone App Connect, Please remove it or start a new page
Replied 01 Dec 2017 06:46:27
01 Dec 2017 06:46:27 Teodor Kuduschiev replied:
It appears you have old HTML5 Data Bindings code on the page.
App connect is the current front end tool, it replaces HTML5 Data Bindings.
Replied 01 Dec 2017 13:43:32
01 Dec 2017 13:43:32 Miguel Quintero replied:
well all of this was built two days ago and plugins where installed and updated, I also just followed the videos for php update database and html5 upload etc... what should i do should i remove tools?

like i have 3 tabs cant attach a picture here
Replied 01 Dec 2017 13:45:36
01 Dec 2017 13:45:36 Teodor Kuduschiev replied:
Miguel i totally lost your point ... i am not sure what exactly are you talking about?
All i need is a live link to the page with the problem.
Replied 01 Dec 2017 14:18:26
01 Dec 2017 14:18:26 Miguel Quintero replied:
I hav ethe porject right now loaded on a local vagrant server but i can set up a test server in a few min, is there a way i can send the url in a private?
Replied 01 Dec 2017 18:02:35
01 Dec 2017 18:02:35 Miguel Quintero replied:
on the link I sent you for another ticket, it involves this ticket as well the top part where there are radioboxes depending on what I have checked should hide and show the boxes bellow
Replied 01 Dec 2017 20:18:52
01 Dec 2017 20:18:52 Miguel Quintero replied:
ok i made a new edit page with app connect still going threw the manuals to add database updates etc..
but for a radio group how can i hide show divs depending on what radio button is selected like in my example:

radio 1
radio 2
radio 3

div 1 show if radio 1 is checked
div 2 show if radio 2 and radio 3 is checked
div 3 show if radio 3 is checked

the dynamic attributte only allows me to pick the id of the radio and not the name attribute so how would it be for that div that depends on more than one radio button checked?
Replied 04 Dec 2017 11:34:06
04 Dec 2017 11:34:06 Teodor Kuduschiev replied:
Hello Miguel,
Just use the expression option and add the condition, then just click the expression you need.
Replied 04 Dec 2017 21:53:59
04 Dec 2017 21:53:59 Miguel Quintero replied:
awesome thank you will now later this week how that goes
Replied 06 Dec 2017 14:44:47
06 Dec 2017 14:44:47 Miguel Quintero replied:
This did not work whn I use this formula it replaces the && with && I also tried to place it manually like


<div class="card" id="per4" dmx-show="group1.item4.checked &amp;&amp; group1.item5.checked">



to


<div class="card" id="per4" dmx-show="group1.item4.checked && group1.item5.checked">


no luck so far
Replied 06 Dec 2017 14:51:10
06 Dec 2017 14:51:10 Teodor Kuduschiev replied:
Please provide a link to your page!
Replied 07 Dec 2017 08:20:23
07 Dec 2017 08:20:23 Teodor Kuduschiev replied:
Hi Miguel on your page you have:


<div class="card" id="per4" dmx-show="group1.item4.checked && group1.item5.checked">


Which is a right expression - but you are using RADIO buttons - how do you expect to be able to select more than one radio button?! You must be using checkboxes if you want to show this card, when item4 and item5 are checked ....
Replied 07 Dec 2017 13:47:42
07 Dec 2017 13:47:42 Miguel Quintero replied:
ok then it needed an or instead of ands so i changed it to

<div class="card" id="per4" dmx-show="group1.item4.checked || group1.item5.checked">

This worked thank you the idea is that only one option should be selected normally i would build this in javascript, but I wanted to get familiarized with the extension you guys have

Reply to this topic