• Resolved mrboats

    (@wpseiskaadmin)


    Hi,

    Looks like your plugin does something very close to what would need but not quite?

    Looking to create a simple “logbook of events” so that the event (or incident) info is reported using CF7 form. After submission, I would like to add the new form content at the end of an existing page (instead of creating a new post).

    Is this somehow codable or not?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    There are 2 ways you could do this,

    1. map your form to a custom post and copy the submitted data to your page – this method has the advantage of keeping a track of your submissions in a custom post type in your backend for future reference/analysis. This would be the way I would do it, as having an organised CMS format of your data has a lot of value. Sticking the data at the end of page makes it more difficult to search and analyse.
      To achieve it you can either build your page after each submission by using the action fired at the end of the submission process, or build the page dynamically when it is requested from the saved submissions. If you expect to have a lot of data, then you want to setup a caching plugin (such WP Super Cache) and rebuild the page only when new data is submitted.
    2. Map you form using custom filter – this is untested. You can map your form to your page in the admin dashboard, and by-pass the submission saving process altogether using the action,
        
      /**
       * Action to by-pass the form submission process altogether.
       * @since v1.3.0
       * @param string $key unique form key.
       * @param array $data array of submitted key=>value pairs.
       * @param array $file array of submitted files if any.
       */
      do_action( 'cf7_2_post_save-'.$post_type, $key, $data, $files);
      

      you can then proceed to append the submitted data to your page.

    Thread Starter mrboats

    (@wpseiskaadmin)

    Now that escaled quickly – to way beyond my skills :-). Thanks for the answer.

    The form content is text intended for reading (and not processing), think doing a cut-and-paste from the CF7 email and append the text to the end of a post. Which would be more appropriate? Do you have any sample code doing something similar to get me started, right now the skill gap is a bit wide to cross..

    Thanks,

    Plugin Author Aurovrata Venet

    (@aurovrata)

    I don’t do specific support as you can read here, however, your problem is quite easy to solve, and in fact if you don’t need to keep track of your submissions, then you don’t really need this plugin, there is a way to do this using only the CF7 plugin, but you still need to learn about WordPress hooks, WordPress framework and PHP coding to solve it.

    If you are in a hurry I advise you hire a developer… for example me by reaching out on vrata at syllogic dot in

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Output multiple forms to same page?’ is closed to new replies.