Add Link directly in custom Form
Best Answers
-
Konstantin_Slavin-Bo Customer Ninja IT Monkey ✭✭✭✭The answer to your question is
$('.col-md-4').next().next().next()
where younext()
the number of times you need.
The better way of doing this is getting an element inside the div you need, and then gettingparent()
of that element, as you then are sure, that you are getting exactly the div you need, e.g. like this for "Urgency":$('.control-label[for="Urgency"]').parent().parent()
This will get you the <div class="col.md-4"> of the div containing the "Urgency" field.
5
Answers
Yes but depends on what you need.
Would the url differ from IR to IR? If you could extend the class to add a properly for the url and then use the URL type control to add this so the form, just like the one on the Vendor AM form (If you use CAM).
If its a static URL for all IRs, the easiest way would be a custom task, but if you want it elsewhere on the form, some custom JS to place some extra html on the form would be the way to go.
Geoff
i need for the customer the second example, a static URL on an custom change request form. Elsewhere on the form. Is there anywhere an example of the custom JS?
Depends on where you want it to show. E.g. this will place a link to community.cireson.com right below the heading on each tab:
As so:
This will show the link on CRs only for analysts. Remove line 5 and 7, to show the link to all users, incl. end users.
If you need this for other classes than change request, simply change
'ChangeRequest'
in line 1 to e.g.'ServiceRequest'
or any other class you need.THANKS!!
Oh sorry, there's a mistake on line 5
The
!
should be removed, if you only want the link to be shown to analysts, so it saysinstead. For end users the same still applies: You need to remove line 5 and 7, if end users needs to see the link too. I edited the original post to reflect this.
Sure, you just append it to the element where you want it displayed. Do you have somewhere specific in mind?
Is it an change on this part of your example?
Where i can get examples / descrition for it?
You can find the class for the custom field by using the DevTool in your browser (F12) - use the inspector to find the field, where you want the link to be under and use the class
$(".CLASS_HERE")
or id$("#ID_HERE)
instead of the part you posted.You using .panel-heading:first. How i can get on the second or third panel for example?
I have more than one class col-md-4 for example and did not find an ID.
$('.col-md-4').next().next().next()
where younext()
the number of times you need.The better way of doing this is getting an element inside the div you need, and then getting
parent()
of that element, as you then are sure, that you are getting exactly the div you need, e.g. like this for "Urgency":This will get you the <div class="col.md-4"> of the div containing the "Urgency" field.
I have a custom field populated to the change request form on the portal.
The field is used to have the number from our Agile development enviroment. But since our Agile is webbased, I will like to make a enternal link direct from the input data.
You can get the value from the field by using
$('.control-label[for="CustomField"]').next().val()
and use the value to create your link.But i dont have all the information regarding the link in the field.
If the value is "STRY001234" then the link need to be "http://agile.com/STRY1234" - how to repopolate static data in the link ?
Which will yield this result (if the field is populatet - if not, it just shows the text box):