The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Problem with the Client area - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Problem with the Client area (/showthread.php?tid=26983) |
Problem with the Client area - sorooshk - Aug 9th, 2017 Hi dear members I have a problem with the client area. Usually when we login as a client, we have to have the access to the form and fill it then edit it, but it Form Tools system the client can see all the form submissions, which is really WEIRD for me!!!!!!!! And more weird is that the client can even edit the previous submissions of the other clients which means a lack of security for me (at least). I want this: I want that when the client logs in he/she can see the form and submit the form, after that he/she be able to edit his/her submission not anyone else, that's end of story not more not less. What should I do? How should I change the PHP codes to get the things that I want? I checked the extensions part in Form Tools site and there was no more cleint area extension, also there was no useful settings for the goals that I want. Would you please help me???????? Thanks in advance. RE: Problem with the Client area - alexh - Aug 9th, 2017 You are probably looking for the submission accounts module: https://docs.formtools.org/modules/submission_accounts/ RE: Problem with the Client area - paullittrell - Aug 11th, 2017 I had this issue was well, so in all of my forms, I created a field `created_by`. I them modified the code in the "\global\code\submissions.php" to include the following. mysql_query("UPDATE {$g_table_prefix}form_{$form_id} SET created_by = '$name' WHERE submission_id = $new_submission_id"); I placed it right after the stock code of: $new_submission_id = mysql_insert_id(); extract(ft_process_hook_calls("end", compact("form_id", "now", "ip", "new_submission_id"), array()), EXTR_OVERWRITE); What it does is update the 'created_by' field with the client user id. I then used the Extended Field Module to create a field equal to the username and set the forms up to filter off that field. RE: Problem with the Client area - sorooshk - Aug 12th, 2017 Hi Thanks for your help, but actually it doesn't work for me. I want the user to see the form as soon as he/she logs in the script. After that be able to just edit his/her form not anyones else!!!! I done the steps that you told me, but it doesn't work. Can we say to get account_id and insert it in the db and when we want to select it in db use a where statement which gives us the forms sunbmited by that account_id ??? |