Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the currently accepted way to embed forms in Refinery CMS sites?

I'd like to create a couple of forms on a Refinery based CMS site. One is a contact form, and another is a variation on this contact form with a few additional fields. For this form, I've looked at the Refinery inquiry gem but I can't seem to find a way of modifying the form for the additional fields, or embedding this on multiple pages (each of which has multiple languages through the i18n gem). I also stumbled across Refinery Engines which might meet my requirements, but it hasn't been updated in quite a while, so wasn't sure whether it would work with the latest version.

Is the Generators gem still in use? Has anyone used this gem for what I'm trying to achieve or what is the Refinery way of creating custom forms?

like image 420
purpletonic Avatar asked Oct 08 '22 07:10

purpletonic


1 Answers

The refinerycms-generators extension was merged into Refinery itself and there exists a form generator in there. To get the syntax, just run:

rails generate refinery:form

It will present you with the help for the generator.

This is currently your best bet for spending the least amount of effort to get forms like refinerycms-inquiries.

like image 74
parndt Avatar answered Oct 11 '22 13:10

parndt