hi there ,
i want to make table where user can add one entry per day .
for example : table name : daily_submissions
1)category (drop down)
2)file
3)date (auto)
i want the user can submit daily one file for each category .
how to make it possible ?
no repeating value if date is same (one enter per day)
-
- Veteran Member
- Posts: 32
- Joined: 2021-06-12 21:01
Re: no repeating value if date is same (one enter per day)
Hi,
you can check in the _before_insert hook if a record from that user for the give category already exists and return false if this is the case.
This will not create a new record.
you can check in the _before_insert hook if a record from that user for the give category already exists and return false if this is the case.
This will not create a new record.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
-
- Veteran Member
- Posts: 32
- Joined: 2021-06-12 21:01
Re: no repeating value if date is same (one enter per day)
i am weak in programming, can you give me some code ?