Prompter, popup list and default item

Viewing 2 reply threads
  • Author
    Posts
  • May 5, 2022 at 5:14 AM #47216

    Victor Warner
    Participant

    I am using the prompter function and for a popup list is it possible for one to be the default?

    On running the script, the default is “Unspecified”

    For example in the following code for passport_type_list variable, I would like the first entry (‘United Kingdom of Great Britain and Northern Ireland passport’) to be automatically shown rather than ‘Unspecified’.

    var heshe;
    var heshe_list = ['his', 'her'];
    var director_signee;
    var passport_type;
    var passport_type_list = ['United Kingdom of Great Britain and Northern Ireland passport', 'Irish passport', 'United States of America passport'];
    
    let prompter = Prompter.new();
    prompter.cancelButtonTitle = 'Cancel';
    prompter.continueButtonTitle = 'Continue';
    prompter.addParameter('Passport type: ', 'passport_type', 'popup', passport_type_list)
    prompter.addParameter('He or she: ', 'heshe', 'popup', heshe_list)
    prompter.addParameter('Name of the director signing: ', 'director_signee')
    .show('Choose whether there is a he or she\n\n\nIf a company then put in name of director signing',output);
    • This topic was modified 1 year, 11 months ago by Brendan.
    May 6, 2022 at 1:03 AM #47225

    Brendan
    Keymaster

    Hi Victor,

    There’s nothing like that now, but in the future I may do something like this where you can specify an additional parameter that’s used as a default value:

    .addParameter('Label 2', 'value_2', 'popup', ['Option 1', 'Option 2'], 'Option 2')

    It’s not there at the moment, so don’t try it now. It won’t work.

    May 7, 2022 at 2:36 AM #47229

    Victor Warner
    Participant

    Brendan,

    Thank you for the response and I do hope you can add this new option.

Viewing 2 reply threads

You must be logged in to reply to this topic.