Jump to content
  • 0

Display values instead of numbers for multi-select listbox


RkaydianFlower

Question

I also posted this in User JavaScript and CSS Discussions because I'm not sure whether custom script was required to achieve this result.

I have a submission form DataPage with a multi-select listbox field. I would like the values the user selects in that field to be passed into the notification email. Currently, only numbers representing the values display.

This is the parameter in the email: 
Profession : [@field:Profession]

This is what it displays in the notification email:
Profession : 4,5,6,53

I would like it to display this:
Profession : Accountant, Actor, Agent/Manager, Artist

Is this possible?

Thank you.

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
On 5/9/2017 at 3:12 AM, RkaydianFlower said:

I also posted this in User JavaScript and CSS Discussions because I'm not sure whether custom script was required to achieve this result.

I have a submission form DataPage with a multi-select listbox field. I would like the values the user selects in that field to be passed into the notification email. Currently, only numbers representing the values display.

This is the parameter in the email: 
Profession : [@field:Profession]

This is what it displays in the notification email:
Profession : 4,5,6,53

I would like it to display this:
Profession : Accountant, Actor, Agent/Manager, Artist

Is this possible?

Thank you.

 

Hi RkaydianFlower

I believe that it should be possible after 9.7 Caspio Bridge platform release.

http://howto.caspio.com/release-notes/caspio-bridge-9-7/

Quote

Lookup Fields

  • Lookup fields can now be included in Pivot reports rows and columns.
  • When passing a Lookup field as a parameter, you can now choose its hidden Value or Display value.

 

 

Hope this helps.

Link to comment
Share on other sites

  • 0

Hi Vitalikssssss: 

This news sounds promising. However I'm not seeing where or how to choose whether the hidden or display value will appear in the mail.

Here is what I see on the Advanced panel for this Multi-Select Listbox field. No mention of parameters. I tested survey submission again and I am still getting the number values instead of the display values.

 

 

 

Multi Select Listbox Advanced.jpg

Link to comment
Share on other sites

  • 0

To get the list of numbers, you need to add

Yourfieldname : [@field:Yourfieldname]

to the body of the notification mail body. It's not automatically included there by Caspio.

To solve this problem I switched to using a regular listbox with the javascript below. Data type is Text. On the desktop, multi-selecting requires holding down Command or Ctrl while selecting, so not ideal. But it works like a charm on mobile.

 

Substitute your field name for "XXXXX"

Place this javascript in footer:
<SCRIPT LANGUAGE="JavaScript">
 /* "fieldName" is the variable name for the listbox type form element field. */
   var fieldName = "InsertRecordXXXXX";

   var x=document.getElementsByName(fieldName);
   x[0].multiple=true;

</SCRIPT>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...