This topic is locked

Allow/Disallow to add new values on the fly

8/13/2020 6:26:04 AM
PHPRunner General questions
ffrinai author

Hi,

is possible to allow/disallow add new values on the fly within events ?

I'd like to "disallow add new values on the fly" depending on other fields in the add/edit page or if the user hasn't an admin profile.

Thanks

Fabio
phpr enterprise 10.3 build 34865 x64

Myr0n 8/13/2020



Hi,

is possible to allow/disallow add new values on the fly within events ?

I'd like to "disallow add new values on the fly" depending on other fields in the add/edit page or if the user hasn't an admin profile.

Thanks

Fabio
phpr enterprise 10.3 build 34865 x64


if the user hasn't an admin profile, in the user group uncheck add right on the table that let "add new values on the fly"

and depending on other fields :

in OnPageLoad

you can use jquery to disable that button.

fhumanes 8/14/2020



Hi,

is possible to allow/disallow add new values on the fly within events ?

I'd like to "disallow add new values on the fly" depending on other fields in the add/edit page or if the user hasn't an admin profile.

Thanks

Fabio
phpr enterprise 10.3 build 34865 x64



Hi.
I think this article can help you solve your problem. https://asprunner.com/forums/topic/27637-guide-1-for-new-to-phprunner-guia-1-para-noveles-en-phprunner/
Greeting,
Fernando

ffrinai author 8/17/2020



Hi.
I think this article can help you solve your problem. https://asprunner.com/forums/topic/27637-guide-1-for-new-to-phprunner-guia-1-para-noveles-en-phprunner/
Greeting,
Fernando


my problem is quite different. I modify the invoice module like in image:


I need 2 document type (1=DDT 2=Rottamazione)

if document type is = 2 i need to allow add article on the fly

if document type is = 1 i need to disallow add article on the fly

I tried to find (firefox debugger) the item-id of "add new button" article to use it in the onload event of list page like

pageObj.toggleItem ("addnew_button-id", true, row.recordId ());

or like

pageObj.toggleItem ("addnew_button-id", false);

but I couldn't find it.

Fabio

Sergey Kornilov admin 8/17/2020

Yes, this is possible and you are thinking in the right direction. The main issue is that Master and Details are two different pages and their pageObj object will be different. So you need to obtain the pageObj of the details table first and then you can hide that link. More info:

https://xlinesoft.com/phprunner/docs/getdetailspage(name_recordid).htm