I've been building out a small CRUD system in Rapido for a project. Here are some things I'm in the process of figuring out.
How do I create dropdown menus and checkboxes?
I want this for the edit form for my rapido app
I should be able to select from options instead of using plain text.
My dream solution might support a "SELECT" and "BOOL" type and work something like this:
Regarding the SELECT or BOOLEAN types: I do not plan to extend the abilities of Rapido regarding forms, because we already have other solutions for that (collective.easyform and Plomino, which are both very powerful).
When I need a complex form with Rapido, I usually implement it with collective.easyform, and then I hijack its form rendering from a Rapido element:
And then I get back the submitted values that way:
easy_form = context.content.getParentNode().manager_form
fields = context.modules.easyform.get_schema(easy_form)
record = rapido.get_record(context.content.id)
if not record:
for field in fields:
value = context.request.get('form.widgets.' + field)
value = fields[field].fromUnicode(value)
record[field] = value
elif field in record:
It's hacky but:
the form schema can be managed via the interface which lets the ability to non-developers to change it the way they want
or it can be managed by importing XML, which is handy for developers