Gossamer Forum
Home : Products : Gossamer Links : Discussions :

use Form informations in add link template (include_form.html)

Quote Reply
use Form informations in add link template (include_form.html)
every links fields has its form information (Form Display, Form Size, Form Type, Form Names ....) in the database

so how is it possible in the include_form.html template to use those informations ???

(for example I don't understand why the name "URL" is coded in the HTML and not taken/reflecting the Form Display "URL" --> if I change the Form Display "URL" in the links Properties to "Home URL", the form submitted to the user doesn't reflect that change ; I still need to change that in the template although the database has that information) ... this is even more usefull with Values and especially if ENUM is used

also (great plugin/enhancement suggestion) it could be possible to generate javascript to validate the input on the user side before being sumitted to the server : could test the lenght, the regex, the not null/required

bye - thanks

Fabrice
Quote Reply
Re: [fff] use Form informations in add link template (include_form.html) In reply to
You update the settings from the admin panel but you still have to update the templates manually.

Quote:
it could be possible to generate javascript to validate the input on the user side before being sumitted to the server : could test the lenght, the regex, the not null/required

It could probably be done but everytime you changed your fields you'd have to update the javascript in the templates. Also quite a lot of people have javascript disabled.

Last edited by:

Paul: Apr 21, 2003, 4:47 AM
Quote Reply
Re: [Paul] use Form informations in add link template (include_form.html) In reply to
In Reply To:
You update the settings from the admin panel but you still have to update the templates manually.
--> so why are this informations stored in the database ???? they are showed to the admin when he validated the links but not to the user when he fills the form ??? strange and a bit unefficient/unproductive
Quote:
it could be possible to generate javascript to validate the input on the user side before being sumitted to the server : could test the lenght, the regex, the not null/required

It could probably be done but everytime you changed your fields you'd have to update the javascript in the templates. Also quite a lot of people have javascript disabled.


--> in contrary not !!! Wink the javascript should be generated also. I think you gave this unswer, Paul, because you are used to edit the form template wich again is unproductive ; if the form infos is taken from the database (except for the layout) --> updated on each rebuild

most of validating javascript have two parts :

a common part to all fields that leads to the same page when an error is detected

a onsubmit or onchange part on each field that leads to the previous scripts

bye

Fabrice