how to data from a form

2 views
Skip to first unread message

mykhyggz

unread,
Jul 15, 2009, 2:58:04 PM7/15/09
to inputex
Trying to submit the data from a form.

POST /orders value={}


I missed something, somewhere. "value" isn't supposed to be one of my
form fields.

What I expect to see is my field names and values, like ?
name=value&name=value

... like what is reported from a normal form submission, say like with
the autocompleter, I get:

Parameter .................. Value
query ....................a

How to get that kind of POST form submit from inputEx form?

mykhyggz

unread,
Jul 15, 2009, 3:19:22 PM7/15/09
to inputex
I guess I have no choice but to deal with the data at the other end as
JSON?

The blank data was from no 'name:' configured for the form fields. DUH
I suppose, but, like why didn't that bomb out at any point, I wonder?
It can't possibly work to submit without fields "named", right?

Now, if I can figure out how to deal with the callback, I'll be good
to go. Guessing return (true); might satisfy the 'callback'
requirement for inputeEx form config, yet not *do* anything.

neyric

unread,
Aug 10, 2009, 6:23:14 AM8/10/09
to inputex
Hi,

I should indeed explain better the use of the form field.
The example page http://javascript.neyric.com/inputex/examples/form.html
is not really helpfull on your issue.

The ajax form options only send json, but if you don't specify it, you
can use the "method", and "action" properties to send it
using standard url form encoding :


new inputEx.Form( {
fields: [
{type: 'select', inputParams: {label: 'Title', name: 'title',
selectValues: ['Mr','Mrs','Mme'] } },
{inputParams: {label: 'Firstname', name: 'firstname', required:
true, value:'Jacques' } },
{inputParams: {label: 'Lastname', name: 'lastname',
value:'Dupont' } },
{type:'email', inputParams: {label: 'Email', name: 'email'}},
{type:'url', inputParams: {label: 'Website',name:'website'}}
],
buttons: [{type: 'submit', value: 'Change'}],
parentEl: 'container1' ,

method: 'GET',
action: 'myUrl.php'
});

This method however cannot send fields that don't return a string
( ListField, Group, ...).

Is it what you're looking for ?
Reply all
Reply to author
Forward
0 new messages