The only real way to do this (and the way that Form.Request does it) is to
use Element.toQueryString to get a query string for the form values, then
inject your new values, then pass that to request. From Form.Request:

var str = this.element.toQueryString().trim();
var data = $H(this.options.extraData).toQueryString();
 if (str) str += "&" + data;
else str = data;
//...some other stuff, then:
 this.request.send({data: str, url: this.element.get("action")});



On Wed, Feb 24, 2010 at 7:22 PM, Sanford Whiteman <
[email protected]> wrote:

> > I can add them to the url, but then I still can't access the variables
> > in PHP via $_POST.
>
> Ryan and Barry have shown you how to pass them via the query string.
>
> If  you  want  everything  to POST (which I think is a better design),
> switch  to  using  Form.Request  and  you  have the `extraData` option
> built-in:
>
> new Form.Request(document.id('form_id'), document.id('result_area_id'), {
>    extraData: {
>         forum_id: intForumId,
>        topic_id: intTopicId,
>        message_id: intMessageId
>    }
> });
>
> -- Sandy
>
>

Reply via email to