ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Process custom post data

January 08, 2012 6:58pm

Subscribe [1]
  • #1 / Jan 08, 2012 6:58pm

    phpnoob

    21 posts

    Hi, I am trying to figure out a best approach for processing custom post data with EE2.  I need a small form,  that will submit post data to a php script,  which will process it and return results to a success page.  Im not sure whether I should a module a plugin or an extension.  Or just have all the PHP in the same template and submit there.  But thats sloppy.

    From my understanding, modules deal primarily with the backend.  I need this form to be on the landing page of my site.

  • #2 / Jan 09, 2012 11:15pm

    John Henry Donovan

    12339 posts

    Hi phpnoob,

    Is this just a standard data collection form with a success message?

    Take a look at Solspace’s Freeform. It should do what you describe

  • #3 / Jan 10, 2012 9:39am

    phpnoob

    21 posts

    Hi John,

    I dont think Freeform or safecracker is a good solution for this.  What I am trying to build is more than just data collection.  The form will take some data yes,  but it will then need to submit it to some controller which will then process this data using a number of libraries, third party API’s, etc… and then redirect the user to a page with results.  Plus I want to be able to make ajax calls to this controller in the future.

    I can do this with CodeIgniter,  because I know how to structure the program.  But I am not sure how to do on top of EE.  The reason I want to use EE is because I want to take advantage of the user management tools, and a alot of other really cool built out features that I dont want to write myself at the moment.

    So I was thinking of building a module for this.  But all the tutorials that I have seen,  do not explain how a module can take POST data from a form on the front-end.

  • #4 / Jan 12, 2012 1:01am

    John Henry Donovan

    12339 posts

    Hi phpnoob,
    thanks for the explanation. This sounds perfect for SafeCracker even though you mentioned it would not be a good solution for this. What specifically did you think SC would not be able to do for you?

  • #5 / Jan 12, 2012 12:20pm

    phpnoob

    21 posts

    Hi John,
    The safecracker module allows only to create entries.  At least thats what I understand.  In my case,  I need to submit my data to a script first.  Then that script will do its own processing and THEN create an entry,  in some cases it wont create entries.  I need to process data first before creating entries, and from I read, you cant set a custom script for form action with safecracker.

    Thats why I was thinking of creating a module. But I am not sure how to submit data via a front-end form to this module.

  • #6 / Jan 17, 2012 3:45am

    John Henry Donovan

    12339 posts

    hi phpnoob,

    As you say a module its probably the way to go then.

    But I am not sure how to submit data via a front-end form to this module.

    Take a look at the following resources
    EE Docs : Channel Entries API
    EE Docs : Add-On Development

    I hope they help

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases