Forums
>
Product Discussion - DotNetNuke Modules
>
Dynamic Forms
Include a "Hidden Until Forced Visible" field in a calculation When hidden
Last Post 10-07-2010 01:00 PM by Ryan Bakerink. 5 Replies.
Author
Messages
Mark Buelsing
river guide
Posts:241
10-01-2010 10:26 AM
I have 10 RadioButtons controls on my form and javascript in each that calculates a grand total whenever a user chooses one of the values of the 10 RadioButtons. I got the javascript total worked out, but then I chose to hide most of those RadioButtons until forced visible. And now my total formula doesn't work anymore unless all the RadioButtons are unhidden.
How do I configure the Javascript to add the values of only the visible RadioButtons?
Ryan Bakerink
river guide
Posts:1900
10-04-2010 12:55 PM
Hello Whetstone,
What kind of values are you getting for your grand total when a question event is unhiding a radio button?
What DNN version are you running?
It does make sense that you're total calculation isn't correct when you have radio buttons that are hidden while waiting for a question event to unhide it.
The reason why? Well when a question event is initiated you can think of it as reloading/refreshing the page. It seems that with hidden fields your fields are losing their values.
If you have any questions please let me know.
Thanks,
Ryan
Mark Buelsing
river guide
Posts:241
10-05-2010 09:45 AM
Yes, it makes sense that it would not add the values of a hidden radiobutton field. The question is, how do I create the sum formula that ignores hidden fields and sums the visible ones? It has to be flexible enough to work both when there are fields hidden and when some of them are not.
Chad Nash
Posts:5260
10-05-2010 02:02 PM
Hi... This has come up a few times, please review this thread:
https://www.datasprings.com/Products/Product-Forums/tabid/727/forumid/5/postid/20999/view/topic/language/en-US/Default.aspx
This basically covers how to use a try/catch and this way if the value is null it just gets skipped... If you look up 'JavaScript Try/Catch' you should see what I mean.
Thanks,
Chad
Mark Buelsing
river guide
Posts:241
10-05-2010 06:23 PM
Thanks Chad. That should do the trick.
Ryan Bakerink
river guide
Posts:1900
10-07-2010 01:00 PM
Hello Whetstone,
Please let us know how everything's going for you based on the initial question you had.
If you have any questions please let us know.
Thanks,
Ryan
Forums
>
Product Discussion - DotNetNuke Modules
>
Dynamic Forms
film izle
720 izle
film
sinema izle
film makinesi
T�rk�e dublaj film
film izle
film izle
baglan film izle
sinema izle
1080 film izle
film mercegi