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.

Joining business logic together

December 08, 2011 9:58am

Subscribe [1]
  • #1 / Dec 08, 2011 9:58am

    jscolton

    26 posts

    Hi,

    I have 2 forms:

    a) Non-members can enter competitions in my site. They provide their answer, name and email.  I am using safecracker to store these details against my ‘competitions-response’ channel.

    b) Non-members can also sign-up by filling in a form with their name and email.  This form submits to index.php with ACT=11 and some form fields.  I inherited this project so I am not sure what EE code gets run when index.php receives ACT=11.  I can’t find the relevant EE file to dissect.  Anyway, a sign-up user then receives an email with an activation code and their system-generated password.

    I would like to combine the effects of both a) and b) by the user simply filling in form a) ie entering a competition.  If I was writing this myself in Java I would simply call both pieces of business logic that store the data and create a new user.  But, in EE I am not sure if you can join business logic together?

    I have thought of using Javascript to open an iframe and populate it with form b) and submit it first and then submit form a).  Form a)‘s ‘thank you’ page is shown.  Once form b) completes, the iframe is closed.

    What do you think?  Seems a bit clunky…

    Many thanks
    Jeremy

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

ExpressionEngine News!

#eecms, #events, #releases