Jump to content
  • 0

Select multiple values from a listbox in a WebForm DataPage


elhide

Question

UpdateRecord in the javascript not allowing multiple choices.

Using the Caspio javascript works in initial capture form

//(1) \"fieldName\" is the variable name for the listbox type form element field.

var workin = \"InsertRecordSt_Pr_Work_In\";

var x=document.getElementsByName(workin);

x[0].multiple=true;

Enters multiple states worked in data table

Search form allowed multiple states by manually entering CT, MA, NH etc

The Update has a problem.

It correctly populates the state list with multiple choices from original capture form as one line item ie CT,MA,NH all on one line.

It won't let you update multiple States like the capture form

//(1) \"fieldName\" is the variable name for the listbox type form element field.

var workin = \"UpdateRecordSt_Pr_Work_In\";

var x=document.getElementsByName(workin);

x[0].multiple=true;

all scripts place in footer in Caspio wizard

Suggestions ?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

The Update has a problem.

It correctly populates the state list with multiple choices from original capture form as one line item ie CT,MA,NH all on one line.

It won't let you update multiple States like the capture form

//(1) "fieldName" is the variable name for the listbox type form element field.

var workin = "UpdateRecordSt_Pr_Work_In";

var x=document.getElementsByName(workin);

x[0].multiple=true;

Looking at the source code of a rendered Details (update) page, the input name becomes 'EditRecordxxxxx'.

Change: var workin = "UpdateRecordSt_Pr_Work_In";

To: var workin = "EditRecordSt_Pr_Work_In";

This worked fine for me. Just make sure that you're putting it in the footer of the Detail (update) page and not the Search Results page.

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...