Adding an hyperlink or a button in a form

Discussions about Forms Designer for SharePoint 2010.
chrisdmontgomery
Posts: 3
Joined: Wed May 01, 2013

19 Jun 2013

What would the syntax be for adding a button to the form?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

19 Jun 2013

If you are using Forms Designer 2.x, please, follow instructions from posts 1 2 3

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

01 Aug 2013

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.

GregFitz
Posts: 7
Joined: Thu May 14, 2015

15 May 2015

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>');

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

18 May 2015

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>');

GregFitz
Posts: 7
Joined: Thu May 14, 2015

18 May 2015

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

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

18 May 2015

Ensure that you use correct internal name of the field in your code.

GregFitz
Posts: 7
Joined: Thu May 14, 2015

18 May 2015

Browser isue cleared now working liek a charm :)


thanks again, all the best,
Greg

Murray
Posts: 3
Joined: Sun Feb 16, 2014

18 May 2015

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

GregFitz
Posts: 7
Joined: Thu May 14, 2015

18 May 2015

Alternatively can this functionality be added to a 'Button' On-Click function? USing the 'Button' drag and drop from left hand menu?


Thanks,
Greg

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests