Choice Field Value

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Cloud.Ed
Posts: 40
Joined: Fri Dec 04, 2015

11 Nov 2016

Here is my script to get data from the parent form. Every item but the "State" works. The state field in the parent is a single selection choice dropdown. We get the "Undifined".



var lcAddress = window.top.fd.field('Street_x0020_Address_x0020_1').value();

var lcCity = window.top.fd.field('City').value();

var lcState = window.top.fd.field('State').value();

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

14 Nov 2016

Hi,

Make sure that you're using the correct internal name of the field.

Cloud.Ed
Posts: 40
Joined: Fri Dec 04, 2015

14 Nov 2016

The first 2 line return values just not the last. I have verified we are using the internal name. I have been confused before, just to make sure, I'm getting the value of a Choice Dropdown. Hope that makes sense.

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

15 Nov 2016

Could you send HTML-source of the parent form page to support@spform.com?

Cloud.Ed
Posts: 40
Joined: Fri Dec 04, 2015

16 Nov 2016

Sent in a .txt file.

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

17 Nov 2016

Hi,

As I can see it's a display form. So, please, try this code:

Code: Select all

window.top.fd.field('State').control()._el().text()

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests