47
Views
8
Comments
Form.Valid is always False
Question
I am having an issue which is causing me to struggle a little bit. It seems that whether a form is "valid" or not, the value while debugging is always false. Functionally, when you hit the if-statement to see if the form is valid or not, it seems to ignore the present value and it operates correctly anyways. That is, if the form is actually valid, it seems to ignore the value in Form.Valid (which is always false). 

Here is a screenshot from just such a case:


If anyone has anything enlightening to say, please don't hesitate. Is this a bug in the version of the platform I am using?
2021-04-17 17-51-40
George Jeffcock
nope mine says 'true' in BookingDetail Save action

Can you post the oml file?


2018-01-05 02-53-30
Grayson Udstrand
Sure thing, see attached. The action in question for me is BookRoom under the screen, BookingDetail, not Save.

Also, I've got OS 9.1.400.0, using the J2EE stack.
Bookings.oml
2021-04-17 17-51-40
George Jeffcock
sorry I dont recreate it using .NET stack OS 9.1.400.0

2021-04-17 17-51-40
George Jeffcock
Hi Grayson,

To help support I would remove all attributes from the form and gradually add them to see which attributes are causing the problem...my bet is the dates....

As the method is set to Client & Server..all the javascript validation that would have occured client side and prevented a the form to be submitted is still being executed but server side now and is completed before your debug breakpoint at Start.

Summary..Remove all attributes and see if you get the false still then there is something really wrong.


2018-01-05 02-53-30
Grayson Udstrand
Okay, I will do so later today and post results here. 
2018-01-05 02-53-30
Grayson Udstrand
Results are disheartening:

(1) Without any attributes in the form at all (that is, simply a form widget with nothing in it and drawing from GetRoomsWithBookings.List.Current as the Source Record), Valid -> true. 
(2) As soon as I add a simple attribute (last name in the booking record in the Source Record), Valid -> false. 

Seems like a bug in J stack which should be addressed. I will open a support ticket and pursue a bug fix.
2021-04-17 17-51-40
George Jeffcock
What happens if you change the validation to be server? Keep only the one simple attribute.

Lets narrow this down.
2018-01-05 02-53-30
Grayson Udstrand
I neglected to mention that was one of the changes I made. So the results in the previous post were with the validation set to only "Server."
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.