PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

How to create a form that posts a child post or child page?

  1. steveweston
    Member

    What is the best way of creating a form that has a number of custom field types that when submitting creates a child post or page.

    1 scenario.
    Essentially form 1 will create the parent page (page1) or post(post1). Post1 or Page1 will contain another form that will capture some additional custom fields and this will get saved to create post1.1 or page1.1

    I then need to be able to repeat this so I would get page/post 1.2, then page/post1.3 etc etc.

    What is the best way of achieving this given I might not have the parent ID so this would have to be dynamic. Also, are there any limitations on whether I should use a page or a post?

    Thanks

    Steve

    Posted 12 years ago on Thursday October 13, 2011 | Permalink
  2. Hi Steve,

    If you want this to be hierarchical you'll need to use pages OR a custom post type that is hierarchical. Here is a snippet that will make the generated page a child of the page from which it was submitted:

    http://pastie.org/2909886

    Posted 12 years ago on Wednesday November 23, 2011 | Permalink

This topic has been resolved and has been closed to new replies.