user input to variable



  • How can I do to store text user input into a variable?
    I want to do something like asking his name. Then using name for custom labels.



  • @hisefilo You can use a label to get user input if you enable the "editable" property. Then have a button that they can click to save it, and in the button callback you can store the label's text in a variable.



  • @hisefilo You can even set the callback directly with the label (triggered when you hit Enter)

    HiseSnippet 1001.3ocsV0saaaCElxwLnVadXAX2N.NeyrQyBjSS6FRQw7hiyfwZRMpaKZAJPAsDsMQnHEjnSqWQA5izdD16xdA1aP2gRTVxYp4GiMci84muC+3gGdNbTrxmkjnhQNMd1xHFx4KwiWJ0y6OmxkngGib9J7ozDMKljo5nkQzjDV.xwYqe0nvoQcT52e+yGQEToOqPEB8BE2m8XdHWWncTueiKDmPCXOiGVx6C5MzWI6qDpE.e1B6ghn9mSmwNiZbqFF4r8f.tVEOVS0rDvmiTAKGOW8VYl+ufmvmHXFgtnwPfxTi5OmKBFkuWSPHm5iJ14aksy+F7o7.9J8EYfuN0.o.Q4bfSs0oT80nT2OGkNQIBLA3yPOmRzqdF81AO1OlGoKrX31WfGJgCmoTHsWlVY9hp87Z39JvCoduP54rShAgUHZ+.OucI22yqyCa51zER9IZxEzXxioSXhtjGQxwNio6qBiTRPncqLysLntDl8uZL62JakZ5xkBtjQltP5q4JIQISc.R5xYr9TgXBbz21OG+tvRHVv5zz88McIvGeJocpJx28HRqVcrpMeE+KaM2KgAqul8NcqcIsdETbQLBDdxgjVj6Z2rF5Z8pigj4wH8OefvDIL6Zb0wePXjdI4v1vNMCZl6tvu1EJwjWj5XkX09rxcemGVJ6blRydhrcG2261v8CtjKaZ5zJsYWHAKtRyl6ewWEv1xEgSXw4o+bGghx0q529lU06mUZTxQkbnjqeRDyJWbunaE2KP1ZKyEXKCAW0o2OZZuejlIQbHF2AmkwQojOsAB5FiZ+bTt37izaA56kidGrIQQgbAQXLb3sHHGjGjF3mxRVHz.3mO7XplZ5PXSEP5IhEq4lSAmiYW.say5Wz.eLK4bsJJMWYuGApu1r06J5H+5dKWIPn8L03oow4L9r4k5nOr2a4A54EJ38lBzaL+2Wq89jY4M2ar82+WxuMUcIt4dsmIEb6i5RbqWN2JcXwr4cS2v+C3KB8o6dY9hu1pfB91aRI99wWZ4akkG233ePo3+GWTJ9+4qrwuTky+dhBLWSErPP0qOryLU2Z.5Er1TEyjCYBWur7T+awDPuJm.V4M8aHc2AOhq8mWMeqUAegqN+eyW66IZhGLcJyWWP153Sd4l93gaAUdpZglKmcJUGygBD7YKBGCUw9Ly7EILICz4TyTJmI6YjMYlwLYPpvmfOqwtFYGqwt4FQgT+X0a7yZkYdwxcR0.bRl9XsFvqFAYxpluXr2ddnP3gTuw22jJ9Af6UiY+M.y81.LGrAXt+Ff4Aa.lebCv7SWIFyaX+kEZUX10DPwnAoyRbbFHMcfRqHQ+Czr7pbG
    

    I don't know why it doesn't enter the "else" condition when the label is empty at compile time though...



  • @ustk Oh I didn't realise there was a keyboard shortcut, excellent!



  • @d-healey In fact I said "when you hit enter", but it is also triggered when you click outside the label
    The fact the condition is not entered at compile is strange... Did I make a mistake?



  • @ustk It looks good to me, nice example! On compile the value is 0 so it won't go into the else clause it will just set the text to empty.



  • @ustk thank you for the snippet! 🙂



  • Thanks guys!! Will try it later. Im also trying tp build a referral button. Using this and building and url with an email user enters. Will post snippet when done.



  • This will allow to insert an email invitation system to your VI. A php parser is needed on the landing URL (will post it later if anyone is interested)

    HiseSnippet 1260.3ocsW0rbaTDDdVauorVPlDJNSMnpnPBrkkjSLfCgnXYYJUD6HPgDtkLZ2QZmx6NyV6NxNhTla4BODblCbj2.eiSbiqT7Dvafom8eaIKKYJTUtr5dld5u9q6omVc8Elzf.gORqvSG6QQZusduwbocKaBii5rGRaM8CHARpONR0ti8HAATKjl1xekRgVgUPge9mGtKwgvMoYpPnmIXlzGybYxLsca90LGm8IVzmxbys661riof2R3HFA3YY8ZHOh4QjgzCIpssjNR6VssXRgeOIQRCPZqrqvZbOawI7n8+LV.quCUITG0CNnH06KbrTHVoE0xl4X0MItCPvozMiEVNhEdO8CXVrT8YrwsCW.m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