NetTalk Central

Author Topic: Droplist multiple selection  (Read 3395 times)

ChrisLaurie

  • Newbie
  • *
  • Posts: 40
    • View Profile
Droplist multiple selection
« on: March 15, 2012, 05:14:12 AM »
Has anyone implemented a multiple selection droplist. My reults are this: In the form in the ValidateValue::Loc:Var i get the values in my string variable to be: ;|;1;|;3;|;5 - which is cool it is a (somewhat laboriously) delimited string.

I can split this (using StringTheory off course  :) ) and reformat and save this and that's cool.

The problem is this: When I hit the save button, the value changes to: ;|;multiple;|; and the user's individual choices are now lost. I assume there is some flavour of ValidateAll happening.


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Droplist multiple selection
« Reply #1 on: March 15, 2012, 05:39:00 AM »
Hi Chris,

I think you're on the right track. It's been a long time since I played with multiple select, but yes, you need to manually "do something" with the result that comes back - best in the Validate::fieldname routine.

You then take your "previously saved result" when the user clicks on Save.

It's a bit clunkly, I know - and needs a bit of love at some point.

cheers
Bruce


ChrisLaurie

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Droplist multiple selection
« Reply #2 on: March 19, 2012, 04:28:40 AM »
OK so I can get the correct value from the multi select and store it.

The next problem is to load the local string with the correct values when the popup form is populated. I cannot work out where this happens.

If I fiddle in firebug the following line in the form is there:
<input type="hidden" value=";|;multiple;|;" name="Loc:DashBoards">

I need to find where this is set in the form and then replace the ;|;multiple;|; value with the current one: ;|;1;|;4;|;6

But where do I do this?


charl99

  • Full Member
  • ***
  • Posts: 185
    • View Profile
    • Email
Re: Droplist multiple selection
« Reply #3 on: April 16, 2012, 06:21:09 AM »
You probably found the answer, but for completeness,

  ! Start of "Pre Update After Primes"

cheers