I am creating a newsletter generator in CMP. I get a list of news (resource from CMS), create a form with a list of choices and I want the form to return to CMP after pressing the “Generate” button. However, when I enter the address in the form action I have in CMS Modx, after submitting the form it redirects me to another page, why?
My snippet:
...
$output .= '<form action="https://website.com/manager/?a=generate-mail&namespace=newsletter">
<label for="s1">Select</label>
<select name="s1" id="s1">
'.$option.'
</select>
<input type="submit" value="Generate">
</form>';
echo $output;
And redirects:
https://website.com/manager/?s1=18