Change input type based on data type

  1. #1

    Change input type based on data type

    I need to change a textfield based on a value in a combobox. For instance, if i choose a numeric value i need to set the inpiut field to NumberField, if a date value is selected i need to change the input field to DateField, etc...
  2. #2
    Hi,

    You can render a required field dynamically. Please see the example how to render a control dynamically.
    http://examples1.ext.net/#/XRender/Basic/New_Window/

    Please note that, certainly, you can render it via JavaScript.

    Another way is using a CardLayout: define required fields at each card and set up a current card depending on ComboBox's value.
    http://examples1.ext.net/#/Layout/CardLayout/Basic/
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    You can render a required field dynamically. Please see the example how to render a control dynamically.
    http://examples1.ext.net/#/XRender/Basic/New_Window/

    Please note that, certainly, you can render it via JavaScript.

    Another way is using a CardLayout: define required fields at each card and set up a current card depending on ComboBox's value.
    http://examples1.ext.net/#/Layout/CardLayout/Basic/
    Good. But the control will be located into a fieldset, if i use the RenderMode.AddTo this method will send the inputfield to the end of the list? cause this is the last contron on this fieldset to be populated.

    Tanx for your quick reply.
  4. #4
    You can call the FieldSet's RemoveAll method before adding a new item.
  5. #5
    Quote Originally Posted by Daniil View Post
    You can call the FieldSet's RemoveAll method before adding a new item.
    the problem is that i got more controls inside the fieldset, this is just the one that changes based in another.
  6. #6
    Could you demonstrate your requirement with some simple example?

Similar Threads

  1. [CLOSED] How get combo input type in javascript?
    By mcfromero in forum 1.x Premium Help
    Replies: 3
    Last Post: Jul 18, 2012, 5:52 PM
  2. [CLOSED] Export Data with Type= Load
    By amitpareek in forum 1.x Premium Help
    Replies: 5
    Last Post: Aug 12, 2010, 11:04 AM
  3. ComboBox input type. And selectedItemValue
    By grmontero in forum 1.x Help
    Replies: 0
    Last Post: Sep 08, 2009, 7:23 PM
  4. [CLOSED] RecordField Enum data type
    By methode in forum 1.x Premium Help
    Replies: 4
    Last Post: May 05, 2009, 3:06 PM
  5. Replies: 2
    Last Post: Jan 26, 2009, 1:12 PM

Tags for this Thread

Posting Permissions