Split contact name field in name, surname

Comments

2 comments

  • Hamid

    Hi Stefan,
    use this method to split your string :

    var a = @Kontakt.match(/\S+/g);
    if(a){
    a[0]
    }

    To show the first part of the name make a[0]
    and for the second part make a[1]

    /Hamid

    0
    Comment actions Permalink
  • Stefan Myoshin Schoch

    I already found a simple solution (by asking Google ;-)):

    var Name
    var Vorname
    Name = Kontakt.toString();
    Vorname = Name.split(',');
    Vorname[1]+" "

    But thanks for answering!!

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk