2

Is there a way to create a Contact7 Form programmatically?

I mean create the respective post type and fill the custom form fields for example as array and after all generate a shortcode for the created form?

1
  • I cannot find any documented API. Which would require you to dig into the plugin's methods and... Aug 15, 2019 at 7:10

1 Answer 1

1

I believe the forms are just post with the type wpcf7_contact_form. Query one up and its meta to see how the form settings and other related stuff are saved. Or browse the plugin source.

You should then be able to insert new form posts with wp_insert_post().

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