Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListAdd up column values based on a checkboxAdd up column values based on a checkbox
Previous
 
Next
New Post
10/29/2008 10:10 AM
 

 Ok, Actually. I have mostly figured this out now.

3 fields : OptionName (text) , OptionPrice (decimal) , OptionScript (HTML)

Then default value in the 'OptionScript' is :

<p><input type="checkbox" onclick="if (this.checked) {form.TotalDollars.value=parseFloat(form.TotalDollars.value)+500} else {form.TotalDollars.value=parseFloat(form.TotalDollars.value)-500};document.getElementById('TotalPrice').innerHTML=form.elements['TotalDollars'].value;" id="checkbox" name="checkbox" /> $500</p>

Now, we need to replace the '500' with the actual value in all 3 places.

To display the total I use an HTML module :

$<span id="TotalPrice">0</span></p> <input type="hidden" size="10" value="0" onfocus="form.TotalDollars.blur();return false;show();" id="TotalDollars" name="text" />

 

This works exactly as I need it but just to make it even easier... is there a way to use a 'token' or 'tag' to replace the 500 with whatever the value in "OptionPrice" is ? Is there a way to call that field ?

thanks

 
New Post
10/29/2008 5:24 PM
 

Riprod, I am impressed!

Change the Type of OptionScript to CalculatedColumn, and add the script as expression :

'<p><input type="checkbox" onclick="if (this.checked) {form.TotalDollars.value=parseFloat(form.TotalDollars.value)+'
+ [OptionPrice] +
'
} else {form.TotalDollars.value=parseFloat(form.TotalDollars.value)-'
+ [OptionPrice] +
'};document.getElementById(''TotalPrice'').innerHTML=form.elements[''TotalDollars''].value;" id="checkbox" name="checkbox" /> $'
+ [OptionPrice] +
'</p>'

 
New Post
11/14/2008 12:06 PM
 

 wow, fantastic!

thank you

 
New Post
11/14/2008 12:15 PM
 

Thank you, My last 2 questions would be how to add categories or headers...

So it would list items like this :

Heading One :
    part 1   $50
    part 2   $40
    part 3   $80

Heading Two :
    part 3   $50
    part 4   $40
    part 5   $80

AND is it possible to link UDT tables. So I can one page with UDT, that you can enter multiple Categories, Then somehow have a link that takes you to another page with UDT that are linked to that category only. I guess you would need to pass some sort of identity and then call it on the resulting page ? any ideas if it is possible. Thanks

 
New Post
11/14/2008 1:18 PM
 

1. It is possible with XSL and a technique called Muenchian Grouping.

2. You can pass values by querysting for example. If the target UDT has a moduleId of for example 67, the value of querystring named udt_67_param_NameOfParameter will be passed into the  UDT XSL script as param_NameOfParameter. Does this help?

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListAdd up column values based on a checkboxAdd up column values based on a checkbox


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out