Guys,
I’m sure this has been asked before but I cant figure it out.
I have a page with a simple form and input text box .
I want to pass the value of that input box into a snippet when the user hits the submit button. (snippet sits on the same page)
How is this done?
[[mysnippet &variable=`??input box value???`]]
thanks
in your snippet use $_POST $_GET or $_REQUEST for example:
<?php
if (isset($_POST['myinputfield'])){
$variable=$modx->db->escape($_POST['myinputfield']);
}
?>
and be sure your snippet is uncached, use [!mysnippet!] for uncached snippet-calls.