Alpha Video Training
Results 1 to 4 of 4

Thread: hide/unhide Textboxes base on selection from Dropdown

  1. #1
    Member
    Real Name
    Steve
    Join Date
    Jun 2017
    Posts
    25

    Default hide/unhide Textboxes base on selection from Dropdown

    Hello,
    Hoping someone can assist me with some change that are required., I have a Dropdown with five options, and five Textboxes. if I select option A from the Dropdown then Textbox A become visible, Select Option B, Textbox B become visible.. etc... I cant seem to get the On change event for the Dropdown working with the JavaScript to hide/unhide the individual Textbox.. Any help will be greatly appreciated. Thank you

  2. #2
    Member
    Real Name
    Daniel Binns
    Join Date
    Apr 2017
    Posts
    42

    Default Re: hide/unhide Textboxes base on selection from Dropdown

    You don't need to use onChange at all.

    You can set the clientside showhide condition to the values.

    Screenshot 2019-01-04 at 09.32.55.png
    Attached Files Attached Files

  3. #3
    Moderator
    Real Name
    James A. Talbott, Jr.
    Join Date
    Apr 2000
    Location
    Versailles, KY
    Posts
    1,441

    Default Re: hide/unhide Textboxes base on selection from Dropdown

    (Since I had started making this video before Mr. Binn's reply, I'll post it here. One of my methods is the same as his method.)

    I have a video showing two methods to accomplish what you want.
    https://screencast.com/t/PA9Sl34B1sc

    The code is posted below so you won't have to re-key it.

    {dialog.Object}.setControlDisplay('TextboxA',false);
    {dialog.Object}.setControlDisplay('TextboxB',false);
    {dialog.Object}.setControlDisplay('TextboxC',false);
    {dialog.Object}.setControlDisplay('TextboxD',false);
    {dialog.Object}.setControlDisplay('TextboxA',false);
    {dialog.Object}.setControlDisplay('TextboxB',false);
    {dialog.Object}.setControlDisplay('TextboxC',false);
    {dialog.Object}.setControlDisplay('TextboxD',false);

    var dropBoxChoice = {Dialog.object}.getValue('drp1');

    switch (dropBoxChoice) {
    case 'Selection A':
    {Dialog.object}.setControlDisplay('TextboxA',true);
    break;
    case 'Selection B':
    {Dialog.object}.setControlDisplay('TextboxB',true);
    break;
    case 'Selection C':
    {Dialog.object}.setControlDisplay('TextboxC',true);
    break;
    case 'Selection D':
    {Dialog.object}.setControlDisplay('TextboxD',true);
    break;

    }
    Jay
    Jay Talbott
    Lexington, KY


  4. #4
    Member
    Real Name
    Steve
    Join Date
    Jun 2017
    Posts
    25

    Default Re: hide/unhide Textboxes base on selection from Dropdown

    Thank you so much for the video, its a great help and learning experience. Really appreciate it.

Similar Threads

  1. Hide / Unhide textbox with a checkbox
    By hogie503 in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 01-03-2019, 08:09 PM
  2. Having a column hide on load, then unhide on click (of a button or another column)
    By pwatt01 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 01-15-2013, 12:08 AM
  3. hide & unhide buttons
    By rrego in forum Alpha Five Version 10 - Desktop Applications
    Replies: 11
    Last Post: 07-12-2011, 11:26 AM
  4. hide/unhide browse columns
    By Marc King - A5solutions in forum Alpha Five Version 5
    Replies: 4
    Last Post: 02-03-2004, 12:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •