Limit Records

Ask your questions here.
garthswest
Posts: 19
Joined: 13 Jul 2021, 11:51
Name: Garth
Location: South Africa, Cape Town

Re: Limit Records

Post by garthswest »

Hi there

The limit is 'created by'

Thanks
Didou12
Posts: 487
Joined: 14 Jan 2023, 14:53
Name: Louis
Location: Montreal, Canada

Re: Limit Records

Post by Didou12 »

So you can use ajax field in the form as the documentation :

Code: Select all

$count_query = db_query("select count(*) as total from app_entity_12 where created_by=" . $app_user['id']);
$count = db_fetch_array($count_query);

if($count['total']>0 and $_GET['item_id']==0)
{
  echo '<script>$(".form-body").html("<div class=\"alert alert-warning\">You need to edit your previous record!</div>")</script>';
  echo '<script>$(".btn-primary-modal-action").hide()</script>';
}
You can hide this ajax field in the item page, and also change app_entity_12 by your entity ID
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
garthswest
Posts: 19
Joined: 13 Jul 2021, 11:51
Name: Garth
Location: South Africa, Cape Town

Re: Limit Records

Post by garthswest »

Thank you very much...all working now.

The only thing is the 'Save' button is not being hid! Not too sure why.
Didou12
Posts: 487
Joined: 14 Jan 2023, 14:53
Name: Louis
Location: Montreal, Canada

Re: Limit Records

Post by Didou12 »

Force refresh your browser,

Can you join a screenshot ?


Last bumped by Didou12 on 31 Dec 2023, 00:09.
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
Post Reply