The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Cleinte Map Filters "bug"? - 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: Cleinte Map Filters "bug"? (/showthread.php?tid=28777)



Cleinte Map Filters "bug"? - nelsondcosta - Oct 13th, 2017

When I create a new form and when I user Client Map Filters, 

email -> field_mail
name -> filed_name

...

When a the user login, can see the post are already created, but when the press to ADD a new, nothing happen and tha Admin can see a new entry but empy. Any help?


Thanks in advance Smile


RE: Cleinte Map Filters "bug"? - Ben - Oct 18th, 2017

Hey Nelson,

Great question. I think I'd call this a bug, but one that was done on purpose...

Obviously the point to Client Map filters is that they limit what you see in the View according to whatever rules you set - i.e. it only shows submissions with data that maps to specific values in the account of the user who happens to be viewing the data.

But creating a brand new submission will by default create an *empty* record - and that DOESN'T map to the user, so the submission won't show up in the View. So after creating it you get booted out back to the list view right away & nothing seems to get added.

To get around it, generally you'd just remove the option to add submissions in that View (Forms -> Edit View -> General tab -> "Can add Submissions"). That's by far the simplest workaround. But you could also probably hack around it by using the Submission Pre-parser module to pre-fill the form field you have the Client Map filter set up with, the moment a new submission is added from within the Form Tools UI: and fill it with whatever value is appropriate from the user's own user account. That would ensure that the moment it gets added, that field contains the right value to allow it to appear in the View. 

I'd need to experiment to get it going, but in theory that would work.

But... to return to the main point: I'd say it was a bug. Smile Definitely a UX bug in the very least. Perhaps by entering a Client Map filter it should warn you that the "Add Submission" feature won't work - or even aggressively auto-disable the option altogether (?). Something to keep in mind for future versions of the script, thanks!

Ben


RE: Cleinte Map Filters "bug"? - paullittrell - Oct 19th, 2017

I had this same issue, my work around was that I created a field called "created_by" and added a piece of code to the submission code to always populate that field with the users username, then just filter buy that username. Now several caveats to this, one any new users that you create, you will need to add the username to an extended field, two for any existing users, you will have to go back and make sure you create the extended field for them in the database, which can be done by editing each preexisting user and copying the username to your new ef field. In my case I just created a script which created the record based on the client id, and copyied the username from the account table.

Paul


RE: Cleinte Map Filters "bug"? - nelsondcosta - Oct 20th, 2017

Thanks for the feedback guys, I have to think more about this Tongue


RE: Cleinte Map Filters "bug"? - Ben - Oct 21st, 2017

Ah good call, Paul. That makes sense.


RE: Cleinte Map Filters "bug"? - nelsondcosta - Oct 24th, 2017

(Oct 19th, 2017, 4:03 AM)paullittrell Wrote: I had this same issue, my work around was that I created a field called "created_by" and added a piece of code to the submission code to always populate that field with the users username, then just filter buy that username. Now several caveats to this, one any new users that you create, you will need to add the username to an extended field, two for any existing users, you will have to go back and make sure you create the extended field for them in the database, which can be done by editing each preexisting user and copying the username to your new ef field. In my case I just created a script which created the record based on the client id, and copyied the username from the account table.

Paul

Paul wonder ideia, can you share? Where did you insert the code and the code too? Tongue

Thanks in advance