• Resolved xhaldos

    (@xhaldos)


    Hi!

    The plugin is super useful to our project, but we need to programmatically add a form to our multisite installation (because we need the forms on all sites to have the same key).

    I followed the instructions at https://advancedforms.github.io/guides/basic/creating-a-form/ but it doesn’t work. The form is not being registered in the wordpress backend even if i put the exact same code of the documentation inside my themes functions.php.

    Is this problem related to multisite installations? Is there a workaround for it?

    Best regards,
    Mike

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter xhaldos

    (@xhaldos)

    ps: the same way “import” in the backend doesn’t work on form json.

    • This reply was modified 4 years, 9 months ago by xhaldos.
    Plugin Author fabianlindfors

    (@fabianlindfors)

    Hi!

    If you register a form in code it won’t show up the admin interface. Any configuration changes would have to be made through the code and not the admin (as there is no way to update the code when the admin settings change).

    It’s definitely possible that there are problems with multi-site setups though. Have you tried using the form you registered in code?

    The JSON import not working worries me a bit. Could you send a copy of the JSON file you’re testing with so I can try replicating the issue?

    Thank you!

    Thread Starter xhaldos

    (@xhaldos)

    Hi, thanks for your reply,

    the form not showing in the admin interface makes sense! I didn’t yet try to use it in my code, I will as soon as I get to it and let you know. Thanks!

    As of the JSON import not working I must apologize for I must have been drinking. I tried importing the php form function instead of a JSON haha.

    But anyway, is there a documentation link for how the json has to look like? I couldnt find any. Or is it just an object with the same properties like in https://advancedforms.github.io/guides/basic/creating-a-form/ ? that would make sense to me.

    Thanks for your support,
    Mike

    Plugin Author fabianlindfors

    (@fabianlindfors)

    Glad to hear, Mike!

    There isn’t any true documentation except for the guide you linked. The recommended way is to set up a form through the admin panel and then use the export feature to generate the JSON and see what it looks like.

    All the best!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘register_forms() not working on multisite’ is closed to new replies.