Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Super Contributor
JeffLemon
Posts: 391
Registered: ‎01-13-2011
My Carrier: NA
Accepted Solution

Get value of a text field in a prompt box?

SystemPrompt *prompt = new SystemPrompt();
//SET ADDITIONAL PROMPT SETTINGS

//LATER IN THE APP
myTitle = prompt->inputField->?????

 How can I get the text that a user has inputted in to my prompt?

 

I have tried:

 

myTitle = prompt->inputField()->defaultText();

 But no luck.

 

This is in C++.

 

Thanks

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Please use plain text.
Developer
Ebscer
Posts: 724
Registered: ‎08-31-2009
My Carrier: Verizon

Re: Get value of a text field in a prompt box?

I have to admit to have been mostly avoiding the c++ but have you tried

myTitle = prompt->inputField()->text;

 


Read my thoughts on BlackBerry Development at news.ebscer.com
Please use plain text.
Developer
strobejb
Posts: 178
Registered: ‎10-15-2012
My Carrier: Orange

Re: Get value of a text field in a prompt box?

[ Edited ]

You can use the SystemPrompt::inputFieldTextEntry() member function


I only used it in QML so far, but I guess in C++ you would use:

 

prompt->inputFieldTextEntry()

 

Please use plain text.
Super Contributor
JeffLemon
Posts: 391
Registered: ‎01-13-2011
My Carrier: NA

Thanks

Thanks

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Please use plain text.