NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Johan de Klerk on October 08, 2023, 01:13:13 AM
-
Hi,
I need to change the Prompt Text and ToolTip in code depending on conditions.
If p_web.GSV('Option') = 1
PromptText = 'Select Option 1:'
ToolTip = 'This will give you the Customer Report'
ELSIF p_web.GSV('Option') = 2
PromptText = 'Select Option 2:'
ToolTip = 'This will give you the Invoices Report'
ELSIF p_web.GSV('Option') = 3
PromptText = 'Select Option 3:'
ToolTip = 'This will give you the Orders Report'
ELSE
PromptText = 'No Option Selected:'
ToolTip = 'Please Select a option for the Report'
END
Any help would be appreciated.
Regards
Johan de Klerk
-
Prompt and Tips are Session Values
Prompt = 'abcde'
SetSessionValue('Prompt ',Prompt)
And the Prompt is a session value
p_web.GetSessionValue('Prompt')
-
Hi Vinnie,
Thanks for the reply.
My field name is Rep:WhichReport
This is one of many fields on my NetWebForm.
I only want to change the Prompt Text and ToolTip for this one field on the form.
Regards
Johan de Klerk
-
Hi
In your Code
p_web.SetSessionValue('Rep:WhichReportPrompt','What you want the prompt to be')
p_web.SetSessionValue('Rep:WhichReportTip','What you want the tip to be')
Form Fields
Field Rep:WhichReport
Equate Rep:WhichReport
Prompt p_web.GetSessionValue('Rep:WhichReportPrompt')
ToolTip p_web.GetSessionValue('Rep:WhichReportTip')
-
Hi Vinnie,
Thank you very much.
It works perfect.
Regards
Johan de Klerk