Form From Email
Permalink
I'm using the default Form block for a simple contact form. But, instead of the email always coming from the same (admin) email, I would like to have it dynamically pull the email provided by the user filling in the contact form. Would this be very hard?
Aha! Sweet, thank you! Now, I guess I'm in trouble if someone were to ever re-order and/or add new questions, correct? What I was trying to do earlier was mess with this part:
But wasn't having any success. This should work fine for now. Just curious how I could future proof it. I know that will take more work though :)
Thanks again, it worked!
}elseif($row['inputType']=='email'){ $answerLong=""; $answer=$txt->sanitize($_POST['Question'.$row['msqID']]);
But wasn't having any success. This should work fine for now. Just curious how I could future proof it. I know that will take more work though :)
Thanks again, it worked!
Just make sure that your question 2 on all your forms require the users email address as an answer..
Just copy the forms folder from the root/concrete/blocks/ folder and paste it into the root/blocks/ folder,
Open the controller.php file and around line 392 find this
Replace it with this
But be aware that the question in your form that asks for the users email address must correspond to the $questionAnswerPairs[#] and in the example above the question was number 2 on the form..