<div dir="ltr">Hi Sebastian<br><br>I don't get it<br><br>Why should works that? looking at the code, I understand that choice fields always run the _validate() function before any custom validate, constraint or invariant. And that function, raise an exception if the selected value is not in the initial vocabulary.<br>
<br>Anyways, I added the default value, but nothing changed<br><br>cheers<br><br><div class="gmail_quote">On Thu, Sep 18, 2008 at 1:53 PM, Sebastian Ware <span dir="ltr"><<a href="mailto:sebastian@urbantalk.se">sebastian@urbantalk.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I am guessing here, but I think you can add a<br>
<br>
default="xyz"<br>
<br>
to your choice field, and then allways have an item in values that corresponds to xyz (such as "Select one...")<br>
<br>
Mvh Sebastian<br>
<br>
18 sep 2008 kl. 17.07 skrev Santiago Videla:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
Hi,<br>
<br>
I'm trying to make a custom search form using formlib<br>
<br>
In that form I have 1 select (schema.choice) that depends on another select field, and using KSS when one changes the other is updated (for example, country and city)<br>
<br>
My interface is something like this<br>
<br>
master = schema.Choice(title='Master field', vocabulary='some.registered.vocabulary')<br>
slave = schema.Choice(title='Slave field', values=['Select one...',])<br>
<br>
But when the slave field it's update using KSS, the submit action give me an "Invalid Input" error in the slave field.<br>
<br>
I guess that this is because, the values updated does not belong to the list of values (['Select one...'])<br>
<br>
How should I tackle this?<br>
<br>
thanks in advance<br>
<br>
<br>
-- <br>
Santiago Videla<br>
<a href="http://www.revolucionesweb.com.ar" target="_blank">www.revolucionesweb.com.ar</a><br>
<a href="http://www.linkedin.com/in/svidela" target="_blank">http://www.linkedin.com/in/svidela</a><br>
<br>
Sigue la mata dando de que hablar siempre abajo y a la izquierda donde el pensamiento que se hace corazón resplandece con la palabra sencilla y humilde que l@s tod@s somos.<br></div></div>
_______________________________________________<br>
Grok-dev mailing list<br>
<a href="mailto:Grok-dev@zope.org" target="_blank">Grok-dev@zope.org</a><br>
<a href="http://mail.zope.org/mailman/listinfo/grok-dev" target="_blank">http://mail.zope.org/mailman/listinfo/grok-dev</a><br>
</blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Santiago Videla<br><a href="http://www.revolucionesweb.com.ar">www.revolucionesweb.com.ar</a><br><a href="http://www.linkedin.com/in/svidela">http://www.linkedin.com/in/svidela</a><br>
<br>Sigue la mata dando de que hablar siempre abajo y a la izquierda donde el pensamiento que se hace corazón resplandece con la palabra sencilla y humilde que l@s tod@s somos.<br>
</div>