Forums: [SOLVED] Show HIdden Field in Edit Page After Pressing Custom Button. - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[SOLVED] Show HIdden Field in Edit Page After Pressing Custom Button. Rate Topic: -----

#1 User is offline   Abhijeet 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 68
  • Joined: 14-September 09

Posted 13 May 2019 - 05:28 AM

Hello All,

Greetings !

I have a simple scenario. I am using phprunner 9.8 Build 30630 x86. I have 1 field on edit page which is hidden in a tab page (single record). I have hidden the field successfully in the first tab page by hide_field command. Now for example purpose there are 2 password fields in the tab page, first is database password (field hidden) and second is user password, Now it is expected that the user should enter password in user password field, the system should compare the user password with database password field(which is hidden) and if the password match then show the FIELDONE field. I have made a custom button on edit page and everything goes fine till here. But after I press "Show Field One" button the field FIELDONE is supposed to be seen by show_field command, but nothing is happening. For your reference purposes, I have attached all possible images and code. Please note that on Server, and client after code, I have kept default code.

After looking at the images, can you please let me know what am I doing wrong here ? I am a noob in php, but have managed to write some code after looking at the documentation.

Please find attached images.
Field Structure
Key Columns
First Tab Edit Page in Editor
Page Settings
Edit Page Before Display
Edit Page Before Process Code
Client Before Edit Page Button Code
Hidden Field Not getting Displayed After Pressing Button in Edit Page

Please help me experts, what am I doing wrong here. What my gut feeling is that if the field is getting hidden, then it should get displayed also on the basis of a condition. I believe this is a conditional formatting. Please advise.

Hope this helps.

Kind Regards,
Abhijeet
0

#2 User is offline   Abhijeet 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 68
  • Joined: 14-September 09

Posted 15 May 2019 - 11:47 PM

View PostAbhijeet, on 13 May 2019 - 10:58 AM, said:

Hello All,

Greetings !

I have a simple scenario. I am using phprunner 9.8 Build 30630 x86. I have 1 field on edit page which is hidden in a tab page (single record). I have hidden the field successfully in the first tab page by hide_field command. Now for example purpose there are 2 password fields in the tab page, first is database password (field hidden) and second is user password, Now it is expected that the user should enter password in user password field, the system should compare the user password with database password field(which is hidden) and if the password match then show the FIELDONE field. I have made a custom button on edit page and everything goes fine till here. But after I press "Show Field One" button the field FIELDONE is supposed to be seen by show_field command, but nothing is happening. For your reference purposes, I have attached all possible images and code. Please note that on Server, and client after code, I have kept default code.

After looking at the images, can you please let me know what am I doing wrong here ? I am a noob in php, but have managed to write some code after looking at the documentation.

Please find attached images.
Field Structure
Key Columns
First Tab Edit Page in Editor
Page Settings
Edit Page Before Display
Edit Page Before Process Code
Client Before Edit Page Button Code
Hidden Field Not getting Displayed After Pressing Button in Edit Page

Please help me experts, what am I doing wrong here. What my gut feeling is that if the field is getting hidden, then it should get displayed also on the basis of a condition. I believe this is a conditional formatting. Please advise.

Hope this helps.

Kind Regards,
Abhijeet


Hello Team,

Just to keep you updated , this was resolved by Sergey, For your reference please find the solution below, it might be of some help to you.

1. ClientBefore

params["pass"] = Runner.getControl(pageid,'USERPASSONE').getValue();

2. Server
$record = $button->getCurrentRecord();
$pass = DBLookup("select TRIM(DATAPASSONE) from DISPLAYTEST where SERIAL=".$record["SERIAL"]);
if ($pass==$params["pass"])
$result["result"]="ok";
else
$result["result"]="not";

3. ClientAfter
if ( result["result"]=="ok" )
pageObj.showField("FIELDONE");
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users