How can I display a drop down TV for visitor to choose from?
I’m working on products shop and need to give ’em the option to choose size.
I don’t see any widget for it but hope it’s doable?
TIA.
-
☆ A M B ☆
- 476 Posts
How can I display a drop down TV for visitor to choose from?
I’m working on products shop and need to give ’em the option to choose size.
I don’t see any widget for it but hope it’s doable?
If I’m understanding what you’re trying to accomplish, you want for visitors on the website to be able to have the ability to be able to choose size for a product on the site, correct?
Something like this? Is this all you’re trying to do?
<select name="size">
<option value="Small">Small</option>
<option value="Large">Large</option>
</select>
I know you’ve already thought that through, but what I guess I’m a bit unclear about is do you need the ability to have the Manager be able to enter values into the T.V. that is the drop down on the front of the website for the visitor? Is that what you’re trying to accomplish? I’m not completely understanding where you’re getting hung up.
Precision Web Development ... SmashStack.com
exactly like your example, I want to let visitor set the value for drop down TV.
I think you need something like that in your formgenerator-snippet:
<?php
// GetInputByTv
global $modx;
$idname=(isset($idname)) ? $idname:"";
$fields= "*";
$docid= (isset($docid)) ? $docid :"";
$published= 1;
$tv = $modx->getTemplateVar($idname, $fields, $docid, $published);
include_once ('tmplvars.commands.inc.php');
include_once ('tmplvars.inc.php');
$output=renderFormElement($tv['type'], $tv['name'], $tv['default_text'], $tv['elements'], $tv['value'], $tv['style']);
return $output;
?>
Bruno