How do you dynamically set the values of a select on a soy blueprint wizard?

I’ve got a blueprint that I’m creating a wizard to help populate. I want the generated page to contain a link to another associated page. I want to get list of pages based on a tag , and display those as an option in my soy select. I’m trying to make our pages link together better …
I’m hoping i can do it in js associated with the soy template, but, I’ve not had any luck.

I’m sort of running out to time for a demo! Trying to get people to see the value of confluence and use it better!

It may be easier to help if you show us what you have right now. I can think of a couple ways to get dynamic values, but I’m not sure how you’re approaching the problem. Generally in Soy, you can set the SoyParameters if you have access to the context map/injection. Otherwise, you would dynamically set them via AJAX + Jquery after document.ready().

Hi - so for starters I cannot even get actually populating the value the javascript

I have this field in my soy template

<select id="location" class="text" type="text" name="location">


and then in my javascript I have

wizard.on("post-render.customer.engagementsbp.wizard_id2", addoptions);

then in my addoption function

function addoptions(ev, state) {

        alert("in here");
       var selectmenu=ev.document.getElementById("location");
       var el=document.createElement('option');


But, it i still only have the hello option in in my dialog … I get the alert so I know i’m getting into my function.

I am pretty new to this stuff so I’m really sorry if this is a daft question!

I also tried this …

  function addoptions(ev, state) {
        alert("in here");
       var $menuoption= ev.$container.find("#location");
        "<select id=\"location\" class=\"text\" type=\"text\" name=\"location\">"+


Wait - that last one did work!