Olaf Zanger writes:
Dies ist eine mehrteilige Nachricht im MIME-Format. --------------4626B012037BD2BAE216AE84 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Have I not yet asked you not to send MIME messages? Then, I do it now. Although, I think, I did it already!
in a form the user needs tu input a optional float. it doesn't work with name="weight:float" since this means float + required. what is the simple solution for that? What should happen, when the user does not provide the float?
* should the field be omitted? Then try the ":ignore_empty" suffix. * do you want a default value in this case? Then try the ":default" suffix in an additional (hidden) form control to provide this default! Dieter
hi there, Dieter Maurer schrieb:
Olaf Zanger writes:
Dies ist eine mehrteilige Nachricht im MIME-Format. --------------4626B012037BD2BAE216AE84 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Have I not yet asked you not to send MIME messages? Then, I do it now. Although, I think, I did it already!
well, it is netscape so i unselected the vcard feature -- hope that helps you.
in a form the user needs tu input a optional float. it doesn't work with name="weight:float" since this means float + required. what is the simple solution for that? What should happen, when the user does not provide the float?
the ZSQL method has a dtml-if-statement. so it doesn't worry about a empty variable, but about a nonexisting.
* should the field be omitted?
no, it should be empty or valid
Then try the ":ignore_empty" suffix. the zsql-method gives me a error message because variable does not exist where is that documented, i can't find it
* do you want a default value in this case? Then try the ":default" suffix in an additional (hidden) form control to provide this default!
<input name:date:ignore_empty="min_date" value=""><input type="hidden" name:default="min_date" value=""> it doesn't work, what is wrong. i don't understand the conzept either. is there a way to have <input name:date:optional="min_date" value=""> thanks for help olaf -- soli-con Engineering Zanger Dipl.-Ing. (FH) Olaf Marc Zanger Lorrainestrasse 23 3013 Bern / Switzerland Fon: +41-31-332 9782 Mob: +41-76-572 9782 mailto:info@soli-con.com mailto:olaf.zanger@soli-con.com http://www.soli-con.com
Olaf Zanger writes:
.... <input name="weight:float"> raises exception for empty field .... What should happen, when the user does not provide the float? the ZSQL method has a dtml-if-statement. so it doesn't worry about a empty variable, but about a nonexisting. "dtml-if" does not worry about a nonexisting variable, too.
Maybe, you need to give your "argument" a default value. Otherwise, ZSQL may complain about a missing argument, before the templates "dtml-if" has a chance.
* should the field be omitted? no, it should be empty or valid
Then try the ":ignore_empty" suffix. the zsql-method gives me a error message because variable does not exist where is that documented, i can't find it ":ignore_empty" tells ZPublisher to just discard empty variables.
If your ZSQL method does not provide a default value for this variable (and it lists it as an argument, of cause), then it will complain. There is a HowTo on zope.org that explains the magic ZPublisher form name suffixes.
* do you want a default value in this case? Then try the ":default" suffix in an additional (hidden) form control to provide this default! <input name:date:ignore_empty="min_date" value=""><input type="hidden" name:default="min_date" value=""> Help! What's that?
You do not append the suffixes to the HTML attribute names but the the value of the NAME attribute. Thus, this should look like: <input type="hidden" name="min_date:date:default" value="1900/01/01"> <input name="min_date:date" value="">
it doesn't work, what is wrong. i don't understand the conzept either. Try to find the HowTo.
Dieter
hi there, hi dieter, i figured out some things after a loooong search :--) thanks for your strong support, it is very helpful. seams like it makes zope to what it is -- by community supported app-server
If your ZSQL method does not provide a default value for this variable (and it lists it as an argument, of cause), then it will complain.
There is a HowTo on zope.org that explains the magic ZPublisher form name suffixes. i found it, shouldn't that be in the standard zsql manual. who can i write to to put that in?
<input name:date:ignore_empty="min_date" value=""><input type="hidden" name:default="min_date" value=""> Help! What's that?
well, rubish as i know now :-) olaf -- soli-con Engineering Zanger Dipl.-Ing. (FH) Olaf Marc Zanger Lorrainestrasse 23 3013 Bern / Switzerland Fon: +41-31-332 9782 Mob: +41-76-572 9782 mailto:info@soli-con.com mailto:olaf.zanger@soli-con.com http://www.soli-con.com
participants (2)
-
Dieter Maurer -
Olaf Zanger