Decimal in popupform

May 17, 2011 at 2:39 PM

Hi,

I'm new in Awesome and I have problem with decimal textfield. It seems that Awesome by default uses en-US. I cahnged cutlure in my mvc project to Lithuanian, but in Awesome popupform window it still uses en-Us. Is there any way to change it?

 

Thanks

Coordinator
May 17, 2011 at 7:08 PM

Hi,

the popupform loads it's content via ajax, that's the only difference between it and a normal view

when you click on the popupform action link the content is filled via ajax and the popup is shown ( you can see this in firebug console)

May 17, 2011 at 7:50 PM

I know that, but there is different between en-Us and LT cultures in decimal number delimiter. In Lithunia its comma and when i write "16,5" client shows error then value must be a number. In normal view validation works ok.

Coordinator
May 17, 2011 at 7:53 PM
Edited May 17, 2011 at 7:55 PM

I'm just guessing but,

could it be that in normal views you are using client side validation ( jquery.validate) and in popupform server validation ? 

(I've doing the same with romanian; numbers are e.g. 32,19 and had no problem)

May 17, 2011 at 8:27 PM

No, both are client-side validation

Coordinator
May 17, 2011 at 8:28 PM

what are you using for client-side validation ?

is it unobstrusive ?

May 17, 2011 at 8:33 PM

i'm using jquery.validate.unobtrusive

Coordinator
May 17, 2011 at 8:38 PM

I knew that the unobstrusive rules are parsed on document ready, so the client side validation doesn't work with forms that came via ajax

http://forums.asp.net/p/1651961/4391703.aspx/1?Re+Unobtrusive+validation+not+working+on+form+loaded+by+Ajax (here are some workarounds)

you could also try to turn off client-side validation for popupform and see if is it going to work with server side validation

do: Settings.PopupForm.ClientSideValidation = false; (actually by default is false) in your Global.asax.cs App_Start()