Page 2 of 2

Re: Adding an hyperlink or a button in a form

Posted: 19 Jun 2013
by chrisdmontgomery
What would the syntax be for adding a button to the form?

Re: Adding an hyperlink or a button in a form

Posted: 19 Jun 2013
by Dmitry Kozlov
If you are using Forms Designer 2.x, please, follow instructions from posts 1 2 3

Re: Adding an hyperlink or a button in a form

Posted: 01 Aug 2013
by Dmitry Kozlov
We added link and button controls to Forms Designer v. 2.7.3. Now you can put links and buttons by dragging them anywhere in the form.

Re: Adding an hyperlink or a button in a form

Posted: 15 May 2015
by GregFitz
Hi was wondering if I can add a variable (i.e. field value) on the end of the href. or add in a filed value directly.


Example


var v = fd.field('PhoneNumber').control().value();

$('.dialer').prepend('<a href="https://PhoneSystem/webdialer/Webdialer?destination=' + <var v> ">Dial</a>');


or

$('.dialer').prepend('<a href="https://PhoneSystem/webdialer/Webdialer?destination= + fd.field('Phonenumber').control().value(); ">Dial</a>');

Re: Adding an hyperlink or a button in a form

Posted: 18 May 2015
by Dmitry Kozlov
Hi Greg,

Your second option looks well, you only need to adjust its syntax:

Code: Select all

$('.dialer').prepend('<a href="https://PhoneSystem/webdialer/Webdialer?destination=' +
    fd.field('Phonenumber').value() + '">Dial</a>');

Re: Adding an hyperlink or a button in a form

Posted: 18 May 2015
by GregFitz
Hi Dmitry thanks this looks great. I now get 'undefined' as a value even though there is a numeric valueinthe field. Looks liek it is not picking up a value.

All the best,
Greg

Re: Adding an hyperlink or a button in a form

Posted: 18 May 2015
by Dmitry Kozlov
Ensure that you use correct internal name of the field in your code.

Re: Adding an hyperlink or a button in a form

Posted: 18 May 2015
by GregFitz
Browser isue cleared now working liek a charm :)


thanks again, all the best,
Greg

Re: Adding an hyperlink or a button in a form

Posted: 18 May 2015
by Murray
There was a typo in internal name. The control had to be changed slightly as well. This works

$('.dphone').prepend('<a href="https://10.7.16.10/webdialer/Webdialer?destination=' +
fd.field('Direct_x0020_Phone').control()._el().text() + '">Call</a>');

How do you change the location of the hyperlink in reference to the field itself. {Call} appears above the field and I would like to see it to the right of the field. Thanks Murray

Re: Adding an hyperlink or a button in a form

Posted: 18 May 2015
by GregFitz
Alternatively can this functionality be added to a 'Button' On-Click function? USing the 'Button' drag and drop from left hand menu?


Thanks,
Greg