Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Error reporting on UPD3 screen
Error reporting on UPD3 screen [message #3053] Sat, 18 August 2012 05:29 Go to next message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
I use an UPD3 pattern modeled exactly as you decsribe in in the documentation using fieldname and fieldvalue to maintain separate rows of data for fields in a single screen. This works great.

However, I now want to add some validation code to ensure that two separate fieldvalues do not conflict logically - and instruct the user that the particular combination cannot be used.

I have added some validation in _cm_updateSelection() which correctly displays my error message if the validation fails. However, the upd3 screen then fails to display all the field values correctly as in the fieldspec (e.g. radio buttons, dropdowns etc.) and instead just displays the values as non-editable text.

I suspect the inclusion of an error in $this->errors is causing some later code in the framework to be skipped.
Re: Error reporting on UPD3 screen [message #3054 is a reply to message #3053] Sun, 19 August 2012 03:38 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
There is a working example of the UPD3 pattern in "Maintain Menu Controls" which does not exhibit the error you are describing. Try putting an alpha value into a numeric field and press SUBMIT. The screen remains the same but a message is displayed under the field which has the error. If you look at the code in this task you may see what is going wrong in yours.

Re: Error reporting on UPD3 screen [message #3055 is a reply to message #3053] Sun, 19 August 2012 16:17 Go to previous message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
Thanks for that. My code was originally based on that process but it seems my version was somewhat out of date.

Works perfectly now.
Previous Topic: Email attachments
Next Topic: Breadcrumb links
Goto Forum:
  


Current Time: Thu Nov 28 03:10:13 EST 2024

Total time taken to generate the page: 0.01138 seconds