DMXzone App Connect Support Product Page


Show hide on specific select value

Asked 30 May 2017 07:42:01
has this question
30 May 2017 07:42:01 Ken Pollard posted:
I want to show/hide a div based on a specific value of a select. I can get it to work like the video if the is a value or no value. But can't figure out how to use a specific value. For instance if the value of the select option is "Polygon" i want to show a specific div. Sure it's just syntax but can't get it.


Replied 30 May 2017 20:56:27
30 May 2017 20:56:27 Ken Pollard replied:
Any chance there is a tutorial or video on this. Seems like should be easy and I'm missing something. Thanks!
Replied 03 Jun 2017 16:19:39
03 Jun 2017 16:19:39 Ken Pollard replied:
Was hoping to get some help on this, not sure if it's so simple your letting me figure it out myself or it's a bad question. If there is not a way to do this, please advise so I can move on to another solution. I'm ok with that, would just like to know.


Replied 05 Jun 2017 08:03:44
05 Jun 2017 08:03:44 Teodor Kuduschiev replied:
Hi Ken,
Sorry, i missed your post last week.
It is really easy to do this - select your container, then dynamic attributes > display > show. Then in the dynamic data picker click value under your select and and add == 'value.' It should become:
select.value == 'Polygon'
Replied 05 Jun 2017 22:45:01
05 Jun 2017 22:45:01 Ken Pollard replied:
Awesome, thanks Teodor!
Replied 07 Jun 2017 01:27:06
07 Jun 2017 01:27:06 Ken Pollard replied:
Hi Teodor,

Can I apply multiple values such as select.value==1 OR select_value==2.

Replied 13 Jun 2017 15:34:25
13 Jun 2017 15:34:25 Bruce Wilkie replied:
Hi Ken

Which video did you originally see how to show/hide if there is a value or no value? Can you link it for me?

I'm trying to only show a message if a select is empty. Eg "Your search didn't produce any results"

Replied 13 Jun 2017 17:12:19
13 Jun 2017 17:12:19 Teodor Kuduschiev replied:
Hi Bruce,
It is even easier in your case: select your container, then dynamic attributes > display > hide. Then in the dynamic data picker click value under your select.
This way, the container will be displayed only when the select ha no value.
Replied 14 Jun 2017 22:20:25
14 Jun 2017 22:20:25 Ken Pollard replied:
Hi Bruce, just in case you still wanted to view, here is the video I saw.
Replied 15 Jun 2017 14:34:52
15 Jun 2017 14:34:52 Bruce Wilkie replied:
Thanks Teo, Ken

Got it sorted with your help
This reply was removed on 7/3/2017 11:39:22 PM.
See the changelog
Replied 27 Mar 2018 13:13:59
27 Mar 2018 13:13:59 Bruce Wilkie replied:
Hi again.

Looking at Ken's query in the thread above about multiple tests, it looks like there wasn't a solution supplied for this, so I just want to check now that I'm wanting to know the same thing.

How do I show or hide an item depending on the result of two different field values in a single select/query

Show the div if either query.field1 OR query.field2 has a value

Note, in my case I've got a table of racing fixtures and for each row in the table I want to link to a results page for but only if a results pdf or a report pdf is available for that particular racing fixture.

My code so far for the repeating row is below, but it's not working at the moment:

<tr dmx-repeat:repeatfixtures="">
<span dmx-show="fixturedate2"> - {{fixturedate2}}</span></td>
<td><a href="" title="Dowload Entry form for Round {{fixtureround}}" dmx-show="entryform" dmx-bind:href="./datafiles/fixturefiles/{{entryform}}">download now</a><span dmx-hide="entryform">not available</span></td>

<!-- the table cell below - I'm trying to show if either of two query fields has a result -->

<td><a href="" title="view results/reports for Round {{fixtureround}}" dmx-show="reportfile OR resultfile" dmx-bind:href="series_fixture_results.php?fixtureid={{fixtureid}}&seriesid={{seriesid}}">view results/reports</a><span dmx-hide="reportfile OR resultfile" >not available yet</span></td>


thanks in advance


Reply to this topic