Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 1:
Do not show drop down field when none selected

 

 


wendy
User

Jun 12, 2006, 3:47 PM

Post #1 of 5 (1441 views)
Shortcut
Do not show drop down field when none selected Can't Post

Hi - Thanks for all previous help. New question: I have some drop down options and I only want them to show up with an item is selected from the list. I tried using the javascript hide :<script type="text/javascript"> if ('$art_field8_je$') { document.write("Source: $art_field8_je$"); }</script> but it doesn't work. I supose that is because something is always selected (my drop downs are: select one, google, yahoo, print, web site, referral).

Basically, what I want to do is only have the drop down field and selection show up only if one of the options is selected - right now it shows up as "Source: Select One". Any way to do this?

Thanks,

Wendy


(This post was edited by wendy on Jun 12, 2006, 3:56 PM)


Donna
Staff / Moderator


Jun 13, 2006, 3:38 PM

Post #2 of 5 (1432 views)
Shortcut
Re: [wendy] Do not show drop down field when none selected [In reply to] Can't Post

Hi Wendy,

Thanks for your post. :)

What you'd want to do in this case is remove the "Select One", so that the default option is blank. When you're setting up the field, set the dropdown like this:

Source (,Google,Yahoo,Print,Web Site, Referral)

By default, the dropdown will be blank, and the conditional statement will work. :)

Alternately, you could find a javascript programmer to write a script for you that changes the coding a little bit so that if art_field8 doesn't equal "Select One", it displays... but I'm not a javascript programmer, so I don't quite know the syntax for that.

I hope this helps. :)

Donna

--
support@interactivetools.com


wendy
User

Jun 13, 2006, 4:31 PM

Post #3 of 5 (1427 views)
Shortcut
Re: [Donna] Do not show drop down field when none selected [In reply to] Can't Post

Great. I'll try it.


klramker
Novice

Jul 27, 2006, 7:57 PM

Post #4 of 5 (1348 views)
Shortcut
Re: [wendy] Do not show drop down field when none selected [In reply to] Can't Post

I would like to do something pretty much the same as what Wendy did, but I'm having difficulty trying to figure out where to put the script. Crazy Any suggestions or tips would be greatly appreciated!

Thanks!Wink


MikeB
Staff / Moderator


Jul 29, 2006, 3:00 PM

Post #5 of 5 (1336 views)
Shortcut
Re: [klramker] Do not show drop down field when none selected [In reply to] Can't Post

Hi klramker,

Thanks for posting! Smile

You would put this JavaScript code right on your template file wherever this field is being output. For example, if you'd like to add some conditional JavaScript to only output $lfieldX$ if a value is entered then you'll just add the conditional JavaScript anywhere in your templates that you see $lfieldX$.

If you're not able to get this up and running and you can provide me a copy of your template file that you're working with I'd be happy to have a look at this for you.

I hope this helps and if you have any other questions feel free to let me know! Smile

Cheers,
Mike Briggs - Product Specialist
support@interactivetools.com

[hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url]
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]