Closed joefitter closed 7 years ago
Do we still want this?
yes, unless you can think of a better way of including the rendered component template in a step?
What's the use case?
component renders the component template to a string, which we then add to the field
in locals.fields
as html
- perhaps it would be better to name it component
For what it's worth, if we do want this functionality then I'd roll it into renderField
.
hmm, yeah that's a good point, removes the nasty if/else logic from the template
Yeah, I think it would be better there, so renderField
is wholly responsible for turning a field into some html.
amended step.html to use field.html if available, if not then renderField.
field.html
is a pre-rendered html string representation of the field