The blocks won't give you access directly to the HTML_QuickForm object. Rather it allows you to place html output to any place you like.
I would break this problem down into 2 parts.
1. Add the extra fields to the form.
2. Add interactivity to hide and show fields based on user interaction.
To add fields to the form that don't correspond to a field in the database you can just add a transient field via the fields.ini file.
e.g.
- Code: Select all
[myfield]
transient=1
widget:type=advselect
...
The transient=1 tells xataface that, despite the fact that this field definition doesn't correspond with a field in the database, you would still like it to appear in your forms.
Then use blocks to add your javascript interaction.