Support

Account

Home Forums General Issues Ninja Forms and ACF

Solving

Ninja Forms and ACF

  • Hi @elliot !

    How are you today ?

    Recently, one of my client asks me if he can easily create forms and assign them to a post or a page.

    By “easily create forms”, he means without writing HTML (I immediately exclude Contact Form 7). So I came up with Ninja Forms, which has a great and active support, and has been downloaded 200.000 times.

    I think it’s the form I need but unfortunately, I can’t use it with ACF… I would like the client to choose which form is related to the current page or post with ACF relation field.

    How could I do that ?

    Thanks !
    Cédric

  • Hi @cedric_charles

    There is an ACF field type that allows you to select a ‘Gravity Form’. If you use the Gravity Forms plugin, then you can use this field type to select a form and render it on a page:

    http://www.advancedcustomfields.com/add-ons/gravity-forms-field/

    Hope that helps.

    Thanks
    E

  • Will that add-on be updated for V4 sometime Elliot?

    For Ninja Forms (or Gravity in V4), another way to do this is to just provide an ACF text field for someone to enter a form ID and then output it into a shortcode in your templates. If the shortcode has parameters (like display title yes/no) you can also set up those values as ACF fields as well.

    I guess you could also use an ACF “Select” Field Type as well, but you’d have to manually add options to represent each new form, so it wouldn’t be future proof if the client can create new forms.

  • Hi @cedric_charles

    The above add-on is in fact compatible with v4! I’ll update my content to reflect this

    Thanks
    E

  • Hi @elliot, @kurdt_the_goat,

    I know Gravity form but it’s a little bit complicated for my client. I’ve tried a lot of plugin and Ninja Forms is the one I need for my client.

    So as @kurdt_the_goat said, I can do it with a simple textarea where the client can simply type the form ID, but I think it’s not user friendly at all. What I want is to have a select box with all the forms (their title) as an option and that this field returns the id of the form so I can use it as I want…

    Any idea how I can generate a field like that ?

  • Hi @cedric_charles

    Head over to the docs and read the tutorial about ‘populating a select field with dynamic data’.

    You can use this filter to populate a select field with what ever choices you want. As long as you can find all the ID’s and titles of the ninja forms, then this will be a simple and effective way.

    Thanks
    E

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Ninja Forms and ACF’ is closed to new replies.