Solved

Form - Check if a URL control was clocked


Badge +10

Here is the business case... we are building a document control system. A document creation request goes thru approval process. Approval form has a link to the document that is being worked on. Requirement is, approver must not be allowed to approve document without opening it first.

 

I put a "When a control raises a Changed event" rule to set the value of a temporary variable and check it at the time of form submit. Changed event is firing at the time form loads but it doesn't fire when approver clicks the URL.

 

How can implement this requirement?

 

Thanks

icon

Best answer by Albarghouthy 18 May 2018, 21:10

View original

2 replies

Userlevel 5
Badge +16

Hi,


 


The Hyperlink control doesn't have click event .


 


Two options:


 


1- Use Button/Toolbar button instead of Hyperlink to navigate to the document, then you can check if the button was clicked


2- Use JavaScript/JQuery to detect the Hyperlink click


 


For example the following script transfer it to a data label on the initialize of the form/view:


 **Make sure the data label propert 'Literal' is checked


 


<script>

$('#HyperlinkID').click(function(){
$("[name='Data Label']").SFCLabel('option', 'text', 'linkClicked');

</script>


I transfer 'LinkClicked' to a data label when the hyperlink is clicked


 


 

Badge +10

Thank you!!

Reply