Topic
  • 1 reply
  • Latest Post - ‏2011-09-20T13:20:00Z by kylesaid
kylesaid
kylesaid
4 Posts

Pinned topic User Input + Javascript Adapter + Content List

‏2011-09-19T11:37:41Z |
Does anyone have any good documentation on extracting the values from a User Input widget using the Javascript Adapter widget? I need to reformat the values properly for the Content List widget.

Example:
User Input widget has two fields: myTextUserInput, myDateInputUserInput

Content List widget is expecting:
[{"name": "MyTextSearchCriteria", "value": myExtractedText},
{"name": "MyDateSearchCriteria", "value": myExtractedDate}]

I'm sure the javascript for this is pretty simple, but I can't seem to find any good documentation on this.
Updated on 2011-09-20T13:20:00Z at 2011-09-20T13:20:00Z by kylesaid
  • kylesaid
    kylesaid
    4 Posts

    Re: User Input + Javascript Adapter + Content List

    ‏2011-09-20T13:20:00Z  
    I've tried to parse the payload using your standard JSON syntax and it just returns a null value. What am I doing wrong?

    Example: var myExtractedText = payload.myTextUserInput

    Also, how would I recreate the payload with the "myExtractedText" variable to a format that the Content List widget will not complain about.