Elxis CMS Forum

Support => General => Topic started by: xmanhattan on November 05, 2012, 17:59:06

Title: eform limited to a specific user
Post by: xmanhattan on November 05, 2012, 17:59:06
Hello all,

I would like to use the eform to be able to send it to a specific user maybe with a hidden code so that the form can only be completed once.

Has anyone tried to setup an eform to a specific user or know how it might be able to be done?

Title: Re: eform limited to a specific user
Post by: datahell on November 05, 2012, 22:47:18
To make the form run only for a specific user you have to modify eforms and add a user check like that:

global $my;
if ($my->id == xx) {
    //run eforms
}
where xx the user id.

To make the form being submitted only once (even for the specific user) you need to store somewhere the information that the form has been submitted. You can store this information in the database or in a flat file (txt or php). A generic place where you can store this info in the database is softdisk.