Hy!
I would like to create a hyperlink in a PlumSail SharePoint Online form that consists of a fixed part of a web address and a dynamic part at the end.
The dynamic part is in a field of the list item.
So I want to link the fixed and dynamic parts and be able to open them in the form with a click.
THX
Hi @Pfeilomatic,
You can add the two parts of the link like this in JavaScript:
let dynamicPart = fd.field('DynamicPartFieldName').value;
let hyperlink = "static part" + dynamicPart;
To display the hyperlink, you could use a Text control:
fd.control('TextControl').html = '<a href="' + hyperlink + '">Link text</a>';
Make sure to put all code inside fd.spRendered so it's executed when the form loads up:
fd.spRendered(function() {
});
Feel free to visit our documentation for more information.
Hy.
Thanks for the answer.
When I add it to my JS in the Form, exactly nothing happends ![:slight_smile: :slight_smile:](https://community.plumsail.com/images/emoji/apple/slight_smile.png?v=12)
fd.spRendered(function() {
let dynamicPart = fd.field('ApprovalOppID').value;
let hyperlink = "https://www.google.com" + dynamicPart;
fd.control('Text10').html = 'Click here...';
});
Hi @Pfeilomatic,
There could be several reasons for this problem.
Could you export the form and send it our way at support@plumsail.com?