This question has been answered by aarond. See the first response.
Have you tried calling it uncached? Verify it's posting the correct value by placing it in the body so you can see its output too.
If you're seeing the number in the source, it's definitely reading the context setting. Since it's just a number, I don't think it's a parsing issue.
I couldn't find any docs for the redirectTo property. I'm guessing it's not redirectTo. I'd look at the formalicious code in core/components/formalicious/elements, or more likely, core/components/formalicious/model to see the actual property name used in the getOption() call. It will be case-sensitive.
$id = (int) $modx->getOption('membership_renewal_resource'); $url = $modx->makeURL($id, 'web', "", 'full'); $modx->sendRedirect($url); return;
<?php $redirectID = $modx->context->getOption('membership_renewal_resource', null, '1'); $formit->config['redirectTo'] = $redirectID; return true;
In that case, I think you want a postHook. Otherwise, the redirect may happen before the form is even displayed.