1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    37
    Answers
    2
    Vote Rating
    1
    Srikanth474 is on a distinguished road

      0  

    Default Unanswered: + before textbox of numberfield

    Unanswered: + before textbox of numberfield


    Hello,

    I have a form which has multiple number fields, some of them will be added to total and some of them will be subtracted from total. i need to display a + or - right before where the textbox starts.

    fieldLabel : +[textbox]

    Any Suggession.


    Thanks & Regards
    Srikanth

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,677
    Answers
    3355
    Vote Rating
    749
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Change the fieldSubTpl
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    37
    Answers
    2
    Vote Rating
    1
    Srikanth474 is on a distinguished road

      0  

    Default


    Hi,
    Thanks for the reply i tried to change fieldSubTpl, but having trouble figuring out how to do it. the textfield is not rendering properly.
    this is what i am trying to do in the fieldSubTpl

    {
    xtype:'textfield',
    fieldLabel : 'testing',
    fieldSubTpl: [ // note: {id} here is really {inputId}, but {cmpId} is available
    '<span>+<input id="{id}" type="{type}" ',
    '<tpl if="name">name="{name}" </tpl>',
    '<tpl if="size">size="{size}" </tpl>',
    '<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>',
    'class="{fieldCls} {typeCls}" autocomplete="off" /></span>',
    {
    compiled: true,
    disableFormats: true
    }
    ],
    },

    Problem is the textbox is going in to next line.
    screenshot:


    i see the same with the below
    {
    xtype:'textfield',
    fieldLabel : 'testing',
    autoEl: {tag: 'span', html: '+'},
    },



    Untitled.jpg
    Last edited by Srikanth474; 2 Apr 2012 at 6:24 AM. Reason: Screenshot was not showing

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    37
    Answers
    2
    Vote Rating
    1
    Srikanth474 is on a distinguished road

      0  

    Default


    Does any one have idea on how to do this.

    Thanks
    Srikanth

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar