Hey All,
I am wondering if there is an easy way to send a select boxs value to a snippet.
&dropdown=`[*option_1*]`
option_1 begin the name of the select box.
And then in the snippet: $dropdown = isset($dropdown) ? $dropdown : ’yellow’;
So this works if I use a TV or just a string.
But how do I send the option that has been click from a dropdown list?
Thanks but I think I need to provide more as its probably more complicated than I thought.
I am actually trying to send TreasureChest the value.
Here is the call: [[TreasureChest? &item=`[+placeholdername+]` &selector=`item_name` &dropdown=`[*option_1*]`]]
The select menu: [+placeholderDropdownName+] [+placeholderDropdownValue+]
Here is the link that adds a product: <a href="#" onclick="return false;" class="treasureChest" title="[+placeholdername+]" name="[+placeholdername+]" rel="item_name">Add to Cart</a>
This link I dont really get, I understand how the return false stops the url going to # but I dont get how treasurechest is triggered?
How can I trigger the ’Add to Cart’ and add the dropdown menus value.
OK never used treasure chest sorry, I would still ask where the dropdown info is coming from. I can’t thing of a way in EVO that you could get the value from a form and feed it in as a parameter to a snippet, only accessing it from with the snippet.
The reasoning for this has nothing to do with MODX or TreasureChest it’s to do with the way HTML and PHP opperate. If it was on REVO then you could use a snippet as the input to the parameter but I don’t think EVO allows nested snippets, this may have changed been awhile since I used it.
EDIT Can you paste your html and snippet code this would let me see better what you are trying to do.
No probs,
Thanks for the help!
Kinda worked out how TC passes the values to the php script.