Stuart Donaldson wrote:
> Integrating FFK along with PSP is starting to look very doable. I
> just get back renderableForm() and then include the individual form
> Now the question is, is there any way to have finer grain control over
> the rendering within fields such as a Radio Field. The radio field
> always renders with the radio buttons on top of one another, using a
> BR between them.
> I want my radio buttons side-by-side. And in some cases, I could see
> wanting to change the orientation all together.
Somewhat off-topic, I realize, but our FormKit supports that level of
granularity. It's set up to allow one to use stylesheets or whatever
low-level formatting one requires.
In particular, check out the FormKitExamples/ManualOutputExample... it's
checkboxes, not radios, but you'll get the idea. There's one using a
crummy templating language called EZT, but the idea should be applicable
FK is set up to be easy to get tags out of, while FFK is more oriented
towards dealing with the whole form; in the case of integrating with a
template, you may find it easier to use FK. In other cases FFK may be
more suited; etc.
With FK, one can do myForm.tag('lastName') and get just the tag for that
for field in myForm.fields():
newLabel = field.label()
newTag = field.tag()
newVal = field.value()
newErr = field.error()
This way you can easily get just the raw pieces of a form, and do
whatever you like with them. Also, it's easy to set style, class, and id
attributes, in order to use CSS effectively. Note that the same methods
exist for choices in a select type of field, so you can dig in and get
radio tags all by themselves.
Sorry to pipe in like this; we're just trying to get a few more folks
interested in using our late-comer FormKit. No disrespect or
discouragement to FFK is intended!