1. #1
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    583
    Vote Rating
    9
    Dumas will become famous soon enough

      0  

    Default Display text between input fields?

    Display text between input fields?


    Hi!

    How is it posible to display text between input boxes, something like this:

    input1: [inputfield]
    input2: [inputfield]
    Here is a text descripting the input field

    If that is not posible, is that posible?

    input1: [inputfield]
    input2: Here is a text descripting the input field
    [inputfield]


    thx
    Dumas

  2. #2
    Touch Premium Member
    Join Date
    Jan 2008
    Posts
    12
    Vote Rating
    0
    John Milton is on a distinguished road

      0  

    Default


    How about items on the form panel something like this?

    PHP Code:
    ...
    items : [ {xtype'textfield'fieldLabel'Field 1', ... },
             {
    html'Text describing field...'style' ... 'borderfalse},
                 ...
    ],
    ... 
    John

  3. #3
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    583
    Vote Rating
    9
    Dumas will become famous soon enough

      0  

    Default


    I tried this, but it doesn't work:
    { html: 'simple', style:'font-size:35pt;', border: false}

    Before everything worked, after including the code everything else works to, but this creates an empty textarea instead of the text 'simple', why?

    thx
    Dumas

  4. #4
    Touch Premium Member
    Join Date
    Jan 2008
    Posts
    12
    Vote Rating
    0
    John Milton is on a distinguished road

      0  

    Default


    Can you show us some more code?

    John

  5. #5
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    583
    Vote Rating
    9
    Dumas will become famous soon enough

      0  

    Default


    of course, here's the whole form-code:
    Code:
    {
                xtype:'fieldset',
                title: 'Texte',
            autoHeight:true,
          defaultType: 'textfield',
          collapsed: true,
                collapsible: true,
                items :[
                        { name: 'HTML',     xtype: 'textarea',    fieldLabel: 'HTML Text', value :'', grow:true},
                        { name: 'text',      xtype: 'textarea',    fieldLabel: 'simple Text', value :'', grow:true},
                        { html: 'here should be some normal text', style:'font-size:35pt;', border: false}
                ]
            }

  6. #6
    Ext User
    Join Date
    Feb 2009
    Posts
    10
    Vote Rating
    0
    sherman_wu is on a distinguished road

      0  

    Default


    You can try insert a form between two textfield like this:

    {xtype:'textfield',fieldLabel:'Text1'},
    {layout:'form',html:'Text describing field...'},
    {xtype:'textfield',fieldLabel:'Text2'}

  7. #7
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    583
    Vote Rating
    9
    Dumas will become famous soon enough

      0  

    Default


    doesn't work as well...

  8. #8
    Ext User
    Join Date
    Feb 2009
    Posts
    10
    Vote Rating
    0
    sherman_wu is on a distinguished road

      0  

    Default


    I think you should remove defaultType and add xtype:'textfield' into each textfield.
    In my application I use 'form' to add text at top of field, and you should add 'width', bodyStyle:"text-align:center;" to control the position of text, it's work in IE and FF,
    but can't use html:"&nbsp" in Chrome.

  9. #9
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    481
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    Below your input field add another item with xtype:'label' and set its html property, or text property if you only want to show plain text.

  10. #10
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    583
    Vote Rating
    9
    Dumas will become famous soon enough

      0  

    Default


    Cool, that was the problem, thx

    Is it posible to let the text atart where the other inputboxes beginn, like that:
    Code:
    label:   [inputbox]
               html text
    instead of
    Code:
    label:   [inputbox]
    html text
    ?

    thx