CA Service Management

  • 1.  association between spinner field and text field

    Posted Oct 03, 2013 08:44 AM
    Hello everyone,

    In my form, i would like to put something that allow me to select a number in a spinner field and that creat (or show) as much text field as expected in the spinner.

    But I really don't know how to do that, I'm a beginner with CA Service Catalog.

    Can you help me?


    PS: Sorry for my english is not my first langage, if my request is not that clear I can make a example.

    Thx
    thibaut


  • 2.  RE: association between spinner field and text field

     
    Posted Oct 14, 2013 08:56 PM
    Hi All,

    any ideas here for Thibaut?

    Thanks!
    Chris


    thibaut.barbey wrote:

    Hello everyone,

    In my form, i would like to put something that allow me to select a number in a spinner field and that creat (or show) as much text field as expected in the spinner.

    But I really don't know how to do that, I'm a beginner with CA Service Catalog.

    Can you help me?


    PS: Sorry for my english is not my first langage, if my request is not that clear I can make a example.

    Thx
    thibaut


  • 3.  RE: association between spinner field and text field
    Best Answer

    Posted Oct 15, 2013 03:11 AM
    Ok, so after some research I do find a way to do what I need.

    I replaced the spinner field by selection items and now, with some javascript function, I'm able to show and hide as text field as I want.

    This is my Javascript function if this can help anyone later.

    addFront : function(){

    var valfront = new String;

    valfront = ca_fdGetSelectedOptionValues(ca_fd.formId,'idnbfront');

    for (nFront=1; nFront<5; nFront++) {
    if ( nFront <= valfront )
    {ca_fdShowField(ca_fd.formId, 'idfront'+nFront);}
    else
    {ca_fdHideField(ca_fd.formId, 'idfront'+nFront);}
    }
    },


    Thibaut


  • 4.  RE: association between spinner field and text field

     
    Posted Oct 15, 2013 02:48 PM
    Thanks for sharing your resolution with the community Thibaut!

    thibaut.barbey wrote:

    Ok, so after some research I do find a way to do what I need.

    I replaced the spinner field by selection items and now, with some javascript function, I'm able to show and hide as text field as I want.

    This is my Javascript function if this can help anyone later.

    addFront : function(){

    var valfront = new String;

    valfront = ca_fdGetSelectedOptionValues(ca_fd.formId,'idnbfront');

    for (nFront=1; nFront<5; nFront++) {
    if ( nFront <= valfront )
    {ca_fdShowField(ca_fd.formId, 'idfront'+nFront);}
    else
    {ca_fdHideField(ca_fd.formId, 'idfront'+nFront);}
    }
    },


    Thibaut