Add DropdownList with values

I  added a dropdownlist on a form, I am unable to make reference to the dropdownlist object via name or type in Javascript. And the object doesn't seem to exist when viewing HTML source. I am trying to populate the dropdownlist  with some values when the form is loaded. But I haven't been able to get the object. Can anyone help?
Parents
  • Hello, Could you elaborate on your use case for dynamically populating this dropdown? In the projects I've worked on, I've found that it's easier to accomplish this by manually creating an HTML field with a select. You can make this select look like a normal Aras dropdown by using the CSS below.
    .toolbarDropdown { /* Add this class to your <select/> tag in the HTML Field */
    display: inline-block;
    padding: 0 2.00033333rem 0 0.33333333rem;
    border-radius: 0;
    border: 1px solid #505050;
    height: 1.667rem;
    appearance: none;
    vertical-align: top;
    margin-top: 4px;
    -webkit-appearance: none;
    background: url("data:image/svg+xml;charset=UTF-8,%EF%BB%BF%3Csvg%20version%3D%221.1%22%20id%3D%22id1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%220%200%2022%2022%22%20enable-background%3D%22new%200%200%2022%2022%22%20xml%3Aspace%3D%22preserve%22%20preserveAspectRatio%3D%22xMaxYMin%20meet%22%3E%0D%0A%3Cg%3E%0D%0A%09%3Crect%20x%3D%220.478%22%20y%3D%220.478%22%20fill%3D%22%233668b1%22%20width%3D%2221.043%22%20height%3D%2221.043%22%2F%3E%0D%0A%09%3Cpath%20fill%3D%22%233668b1%22%20d%3D%22M21.044%2C0.957v20.087H0.957V0.957H21.044%20M22%2C0H0v22h22V0L22%2C0z%22%2F%3E%0D%0A%3C%2Fg%3E%0D%0A%3Cpolygon%20fill%3D%22%23FFFFFF%22%20points%3D%227%2C9%2015%2C9%2011%2C14%20%22%2F%3E%0D%0A%3C%2Fsvg%3E%0D%0A") right top no-repeat;
    background-color: #ffffff;
    }
    After setting up the HTML Field, you can look at this sample for adding an option to a select programmatically. Chris
    Christopher Gillis Aras Labs Software Engineer
Reply
  • Hello, Could you elaborate on your use case for dynamically populating this dropdown? In the projects I've worked on, I've found that it's easier to accomplish this by manually creating an HTML field with a select. You can make this select look like a normal Aras dropdown by using the CSS below.
    .toolbarDropdown { /* Add this class to your <select/> tag in the HTML Field */
    display: inline-block;
    padding: 0 2.00033333rem 0 0.33333333rem;
    border-radius: 0;
    border: 1px solid #505050;
    height: 1.667rem;
    appearance: none;
    vertical-align: top;
    margin-top: 4px;
    -webkit-appearance: none;
    background: url("data:image/svg+xml;charset=UTF-8,%EF%BB%BF%3Csvg%20version%3D%221.1%22%20id%3D%22id1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%220%200%2022%2022%22%20enable-background%3D%22new%200%200%2022%2022%22%20xml%3Aspace%3D%22preserve%22%20preserveAspectRatio%3D%22xMaxYMin%20meet%22%3E%0D%0A%3Cg%3E%0D%0A%09%3Crect%20x%3D%220.478%22%20y%3D%220.478%22%20fill%3D%22%233668b1%22%20width%3D%2221.043%22%20height%3D%2221.043%22%2F%3E%0D%0A%09%3Cpath%20fill%3D%22%233668b1%22%20d%3D%22M21.044%2C0.957v20.087H0.957V0.957H21.044%20M22%2C0H0v22h22V0L22%2C0z%22%2F%3E%0D%0A%3C%2Fg%3E%0D%0A%3Cpolygon%20fill%3D%22%23FFFFFF%22%20points%3D%227%2C9%2015%2C9%2011%2C14%20%22%2F%3E%0D%0A%3C%2Fsvg%3E%0D%0A") right top no-repeat;
    background-color: #ffffff;
    }
    After setting up the HTML Field, you can look at this sample for adding an option to a select programmatically. Chris
    Christopher Gillis Aras Labs Software Engineer
Children
No Data