Masked / Unmasked Password Option

Answered

Comments

1 comment

  • Avatar
    jesus

    Hi MarkSDM,

    Unfortunately, InstallBuilder doesn't support currently a native option to unmask/mask the value of a passwordParameter. However, you can follow the next example to achieve that:

    <parameterGroup>
        <name>password_group</name>
        <explanation></explanation>
        <value></value>
        <default></default>
        <orientation>horizontal</orientation>
        <parameterList>
            <passwordParameter>
                <name>password_entry</name>
                <description></description>
                <explanation></explanation>
                <value>${password}</value>
                <default></default>
                <allowEmptyValue>1</allowEmptyValue>
                <askForConfirmation>0</askForConfirmation>
                <descriptionRetype></descriptionRetype>
                <width>40</width>
                <postShowPageActionList>
                    <setInstallerVariable name="password" value="${password_entry}"/>
                    <setInstallerVariable name="password_plain" value="${password_entry}"/>
                </postShowPageActionList>
            </passwordParameter>
            <stringParameter>
                <name>password_plain</name>
                <description></description>
                <explanation></explanation>
                <value>${password}</value>
                <default></default>
                <allowEmptyValue>1</allowEmptyValue>
                <ask>0</ask>
                <width>40</width>
                <postShowPageActionList>
                    <setInstallerVariable name="password" value="${password_plain}"/>
                    <setInstallerVariable name="password_entry" value="${password_plain}"/>
                </postShowPageActionList>
            </stringParameter>
            <stringParameter>
                <name>password</name>
                <description></description>
                <explanation></explanation>
                <value></value>
                <default></default>
                <allowEmptyValue>1</allowEmptyValue>
                <ask>0</ask>
                <width>40</width>
            </stringParameter>
            <linkParameter>
                <name>update</name>
                <description>Show</description>
                <explanation></explanation>
                <displayStyle>button</displayStyle>
                <clickedActionList>
                    <if>
                        <actionList>
                            <setInstallerVariable name="parameter(password_group).parameter(update).description" value="Hide" />
                            <setInstallerVariable name="parameter(password_group).parameter(password_entry).ask" value="0" />
                            <setInstallerVariable name="parameter(password_group).parameter(password_plain).ask" value="1" />
                        </actionList>
                        <conditionRuleList>
                            <isTrue value="${parameter(password_group).parameter(password_entry).ask}"/>
                        </conditionRuleList>
                        <elseActionList>
                            <setInstallerVariable name="parameter(password_group).parameter(update).description" value="Show" />
                            <setInstallerVariable name="parameter(password_group).parameter(password_entry).ask" value="1" />
                            <setInstallerVariable name="parameter(password_group).parameter(password_plain).ask" value="0" />
                        </elseActionList>
                    </if>
                    <updatePage/>
                </clickedActionList>
            </linkParameter>
        </parameterList>
    </parameterGroup>
    
    0
    Comment actions Permalink

Please sign in to leave a comment.