Check how many records a user entered

joit

Active Member
Hi,
I have 2 kinds of user groups and I want to limit the number of simultaneous records the free user can enter to 5. It would be nice if the user wants to open the form, the number of records would be checked and if there are 5 an error message should be displayed (only logged in users have access to the form).
Any ideas?

Thanks in advance.
 
Hi
There's a limit form plugin but looking at it it doesn't work off user groups but rather specific
....
Ok I took a look and I've altered the plugin so now you can do the following (presuming you update from git)

First create a new fabrik list to store the information about how many entries each user group can store. I called my 'limit group' with the following fields:

* id
* group_id (stores a reference to the group id)
* max (stores how many records members of this group can store)

Add some records to this table, for testing purposes.

The edit your form and add the limit plugin with the following setting.

* Connection: the connection you store the 'limit group' list in
* Lookup list: 'limit group'
* Type: 'Group'
* Lookup element: 'group_id'
*Max element: 'max'
 
Sounds good! I got until the point "stores a reference to the group id"
Could you please be a little more precise what you mean by that?
What I'm also wondering: when a user deletes his 5th record he should be able to add a new record, is this handled by the plugin?
 
I haven't tried, but I suspect by "group id" he means the ID of the group. :)

Which will be the number in the rightmost column in your J! User Groups list, with the heading "ID".

-- hugh
 
What I'm also wondering: when a user deletes his 5th record he should be able to add a new record, is this handled by the plugin?
Yup he should be able to add additonal records. We do a count on the actual number of currently stored records, so deleting one will then allow the user to add an additional record.
 
What I'm also wondering: when a user deletes his 5th record he should be able to add a new record, is this handled by the plugin?
Yup he should be able to add additonal records. We do a count on the actual number of currently stored records, so deleting one will then allow the user to add an additional record.
 
Just one last question. How can I set unlimited entries for a certain user group? If I set a very high number, there is always "You have X of Y entries remaining" displayed, which is not nice.
 
HI

OK. Is there a way I can change the message? Maybe turn it off/on by user group?
hmm no.
What I did quickly do which solves your initial question, is set things so that if the 'Max elements' value is -1 then the plugin allows for unlimited records and won't display a message.
Changes are in github

-Rob
 
That's a good solution!
I used Fabrik-fabrik-d131329 and tried to set max to -1 but then I always get the error message. I tried back and forth but no success.
Did you test it?
 
I checked again with latest github and the unlimited thing is still not working for me.
Can you please have look?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top