radioField allowAny submits wrong value

3 views
Skip to first unread message

Herbie

unread,
Sep 23, 2010, 2:36:33 AM9/23/10
to inputex
Hello all

I'm trying to use the RadioField with optional string field:

YAHOO.util.Event.onDOMReady(function(){
var Kurz = new inputEx.RadioField(
{
parentEl: "Kurz_div",
allowAny: true,
"name" : "Kurz",
"choices" : ["Prof.","Dr."]
});
});

This is working as expected. But when entering a value in the string
field (i.e. Prof. Dr. med) the submitted value on the server side is:

"inputEx-RadioField-allowAny"

an not Prof. Dr. med. Seems to be a bug for me.

There is a second issue:

YAHOO.util.Event.onDOMReady(function(){
var Kurz = new inputEx.RadioField(
{
parentEl: "Kurz_div",
allowAny: true,
"name" : "Kurz",
"choices" : ["Prof.","Dr."],
"value" : "Prof. Dr. med"
});
});

One would expect that an optional value which is not in the choices
list should appear in the string field. Do I missing something?
Current behavior: The optional value disappears.

Thanks for helping
Best regards
Herbie

Eric Abouaf

unread,
Sep 24, 2010, 3:26:07 PM9/24/10
to inp...@googlegroups.com
Hi,

1) True. Actually we always use it for ajax or js interfaces, 
    so you might expect some bugs when using "extra"-html fields with the standard browser submit...
    Clearly here the "value" attribute of the "anyField" was not updated.

2) More problematic: it was not using the allowAny:{value:}, instead of the value...

I think this commit fixes both. Max, can you review this commit ? :)




--
You received this message because you are subscribed to the Google Groups "inputex" group.
To post to this group, send email to inp...@googlegroups.com.
To unsubscribe from this group, send email to inputex+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/inputex?hl=en.




--
Eric Abouaf
eric....@gmail.com
Tél: 06 29 86 37 89

Herbie

unread,
Sep 24, 2010, 3:34:08 PM9/24/10
to inputex


On 24 Sep., 21:26, Eric Abouaf <eric.abo...@gmail.com> wrote:
> Hi,
>
> 1) True. Actually we always use it for ajax or js interfaces,
>     so you might expect some bugs when using "extra"-html fields with the
> standard browser submit...
>     Clearly here the "value" attribute of the "anyField" was not updated.
>
> 2) More problematic: it was not using the allowAny:{value:}, instead of the
> value...
>
> I think this commit fixes both. Max, can you review this commit ? :)
>
> http://github.com/neyric/inputex/commit/a1f119fc842825929d0574a978cb7...

Hi Eric

Thanks for your answer. I'm just leaving the office for 1 week
(holidays :-) When
I'm back, I will try it. I made a hidden field and some javascript for
a workaround.

Best regards
Herbie

Eric Abouaf

unread,
Sep 24, 2010, 3:37:09 PM9/24/10
to inp...@googlegroups.com
Happy holidays then ! :)

Reply all
Reply to author
Forward
0 new messages