under Plone4/Zope3, I have a form to add a new object.
I'd like to add a button after the first field, to do the following : - the user enters the value for the first field - he presses this new button - and the server will try to guess the remaining field based on the first field and an external database. - the user will then have to check if all fields are OK and then submit the form.
I am not a zope expert, and spent some time trying to figure out how to do this.
Is creating a subform a good idea ?
If not, I could add a new button to the form : I tried something like @button.buttonAndHandler(_(u'Essai')) def essai(self, action): print "button essai"
but then I have the following issues : - how to render the button after the first field and not at the bottom ? - how to update the remaining fields without submitting the form ? - how to keep the "add" and "cancel" button that disappeared when I added this essai button.
any hints ? Thx