I would like to be able to add an option to an optionList, via addChoiceOptions, only in the case where the option is not already in the optionList.

Currently, addChoiceOptions is run in the preShowPageActionList, which means that if the user goes back to this page, the option is added to the optionList again, resulting in multiple occurrences of the same option.

How can I make it so that this option will only ever be in the optionList once?

asked 21 Apr, 06:23

dspencer12's gravatar image

dspencer12
16124
accept rate: 0%


To avoid this behavior, you could add the <addChoiceOptions> to the <preInstallationActionList>.

link

answered 16 hours ago

Michiel's gravatar image

Michiel ♦
82114
accept rate: 22%

That's a good idea - thanks!

(16 hours ago) dspencer12
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×4
×2

Asked: 21 Apr, 06:23

Seen: 34 times

Last updated: 16 hours ago