there is tool forms(/craft/app/templates/_includes/). But I cannot find usage manual, ex. options for forms.select etc. Where is it, guys? Thank you


At this time, there is no manual for it.

It's an incredibly useful chunk of code, but it's buried pretty deep in the system. I think the belief is that "if you're capable of finding it, you're capable of backwards-engineering it."

I'd actually suggest looking to other parts of Craft (and other plugins) to gain a better understanding of some real-world applications and examples.

| improve this answer | |

That is not answer just example of one of the tag

{{ forms.select({
        label: "Default Status"|t,
        options: { "optval1": "Text1", "optval2": "Text2" },
        id: 'defaultStatus',
        name: 'defaultStatus',
        value: settings.defaultStatus,
        errors: settings.getErrors('defaultStatus')

I hope will be useful for someone

| improve this answer | |
  • Dear user, I think this is not very useful as an answer. But you can edit your question and make your question more useful with this snippet of code, thanks! – carlcs Dec 4 '14 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.