Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [pugdog] How to highlight incorrectly filled form part?

Quote Reply
Re: [pugdog] How to highlight incorrectly filled form part? In reply to
Thanks your help & info.
In the meantime I was able to discover how the error checking, reporting, and form validating works. It is done in a strange way through package globals, and the error() method.
I would do it in an easier way in place of Alex (however it is working well).

This "highlight the form fields with error" feature is being implemented into my Xtended A.M.D. plugin (XAMD) which enhances the current features (LSQL 2.1.1) of link adding, modifying, deleting.

I solved the problem in the following way:
- duplicated the affected functions (methods)
- changed to pass back hash content containing like Contact_name_error => "error message"
- I solved it by keeping original functionality if this feature is not enabled

pugdog: the add method in GT::SQL::Table gives back id, if add was successful otherwise undef. The real error reporting is done through the error method of GT::Base.


New features already added to Xtended A.M.D. plugin (XAMD):
- Form input fields are generated automatically and are available through tags like: <%Contact_Name%>, or <%Password%>, etc... - implemented for add
- Fully changeable display format of individual error messages, through template: error_form_sub.html. The error messages are inserted through error_message tag - implemented for add
- Changeable individual error message delimiter. Default is "<br>". - implemented for add
- Fully changeable display format of the error table, through template: error_form.html. The error messages are inserted through error_list tag (originally I used the error_table tag, but I decided error_list tag is more descriptive. Please tell me, if you like error_table tag much better). - implemented for add
- Error messages are displayable separately through template tags: <%Contact_Name_error%> or
<%Password_error%>, etc... - almost finished for add, already working
This way you can highlight the input fields where has not correct input this way:
<%if Password%><table border=5 bgcolor="red"><tr><td><%Password%></td></tr></table>
<%else%><%Password%><%endif%>


Opinions, comments are always welcome.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Aug 6, 2002, 3:00 AM
Subject Author Views Date
Thread How to highlight incorrectly filled form part? webmaster33 5807 Aug 5, 2002, 3:34 AM
Post Re: [webmaster33] How to highlight incorrectly filled form part?
Dafyyd 5622 Aug 5, 2002, 1:35 PM
Thread Re: [webmaster33] How to highlight incorrectly filled form part?
pugdog 5708 Aug 5, 2002, 3:55 PM
Thread Re: [pugdog] How to highlight incorrectly filled form part?
webmaster33 5564 Aug 6, 2002, 2:55 AM
Thread Re: [webmaster33] How to highlight incorrectly filled form part?
Paul 5667 Aug 6, 2002, 3:15 AM
Thread Re: [Paul] How to highlight incorrectly filled form part?
webmaster33 5602 Aug 6, 2002, 3:47 AM
Thread Re: [webmaster33] How to highlight incorrectly filled form part?
Paul 5560 Aug 6, 2002, 3:56 AM
Thread Re: [Paul] How to highlight incorrectly filled form part?
webmaster33 5556 Aug 6, 2002, 4:35 AM
Thread Re: [webmaster33] How to highlight incorrectly filled form part?
Paul 5586 Aug 6, 2002, 5:17 AM
Thread Re: [Paul] How to highlight incorrectly filled form part?
webmaster33 5563 Aug 6, 2002, 5:49 AM
Thread Re: [webmaster33] How to highlight incorrectly filled form part?
Paul 5575 Aug 6, 2002, 5:56 AM
Post Re: [Paul] How to highlight incorrectly filled form part?
webmaster33 5489 Aug 6, 2002, 6:46 AM
Thread Re: [webmaster33] How to highlight incorrectly filled form part?
pugdog 5541 Aug 6, 2002, 7:19 AM
Thread Re: [pugdog] How to highlight incorrectly filled form part?
webmaster33 5549 Aug 6, 2002, 9:05 AM
Thread Re: [webmaster33] How to highlight incorrectly filled form part?
pugdog 5491 Aug 6, 2002, 1:10 PM
Post Re: [pugdog] How to highlight incorrectly filled form part?
Ian 5517 Aug 6, 2002, 2:22 PM
Post Re: [pugdog] How to highlight incorrectly filled form part?
webmaster33 5455 Aug 7, 2002, 7:10 AM
Thread Re: [webmaster33] How to highlight incorrectly filled form part?
yogi 5448 Aug 7, 2002, 5:37 AM
Post Re: [yogi] How to highlight incorrectly filled form part?
webmaster33 5478 Aug 8, 2002, 1:21 AM