<div dir="ltr">Hi Sebastian<br><br>I don&#39;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">&lt;<a href="mailto:sebastian@urbantalk.se">sebastian@urbantalk.se</a>&gt;</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>
 &nbsp;default=&quot;xyz&quot;<br>
<br>
to your choice field, and then allways have an item in values that corresponds to xyz (such as &quot;Select one...&quot;)<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&#39;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>
 &nbsp; master = schema.Choice(title=&#39;Master field&#39;, vocabulary=&#39;some.registered.vocabulary&#39;)<br>
 &nbsp; slave = schema.Choice(title=&#39;Slave field&#39;, values=[&#39;Select one...&#39;,])<br>
<br>
But when the slave field it&#39;s update using KSS, the submit action give me an &quot;Invalid Input&quot; error in the slave field.<br>
<br>
I guess that this is because, the values updated does not belong to the list of values ([&#39;Select one...&#39;])<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>