Create a link from a form field value

English! place to talk about development, programming and coding
Post Reply
lerik
Znuny newbie
Posts: 2
Joined: 25 Oct 2011, 11:19
Znuny Version: 3.0.10
Real Name: Lars Erik Gullerud
Company: Signal Bredbånd AS

Create a link from a form field value

Post by lerik »

We have a lot of customers with bad customer data in our CRM database. A lot of them however are in touch with our support department from time to time. Now, rather than having the support people open up the CRM system, search for the customer, edit the info, etc. and then search for the customer all over again when entering the ticket information in OTRS (which takes a long time), I'm trying to create a direct link on the new phone ticket form to open a window to our CRM system with the Customer-ID (found in OTRS) as a parameter so they can correct the data immediately.

I.e. today, when the auto-complete search box finds the customer, the Customer-ID field is being populated with an AJAX function, so you get the $QData{"CustomerID"} into the Customer-ID field. However, I want to insert a HREF behind this (or even better, just an onClick on this field) that opens up "my.crm.url/?id=xxxxx&action=edit" where xxxxx of course is the ID in $QData{"CustomerID"}.

This is however a bit outside my area of knowledge, so I am trying to figure out how to make a link that contains the field value that this JavaScript populates. Can anyone with some JavaScript/AJAX clue give me a pointer in the right direction?

Regards,
Lars Erik
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Create a link from a form field value

Post by crythias »

OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Post Reply