Hello,
I am creating a component that will allow a user to enter text data, and click a save button. I then need to grab that text and do stuff with it.
This component has 3 controls: a TEXTINPUT (commentsText), a button to save and a button to cancel.
I have also created 4 custom properties for the control: the OnSaveClick event, the OnCancelClick event, the DefaultText input, and the CommentText output. The DefaultText text is intended to initialize the Text property of the commentText control, and the CommentText property is intended to be what I read to get the users input when the OnSaveClick event is raised.
My problem is that I am not able to 1) set the commentText to the DefaultText, and 2) read back what the user entered.
I have a button that I use to show the component using the following code in the button's OnSelect property:
rmaCommentBox.DefaultText="Add your comments here...";
UpdateContext({varShowRmaComments:true});
I am using this code to read back the user's input:
Notify("Comments: " & rmaCommentBox.CommentText);
Inside the component I am setting the Value property of the commentText control to the following code:
Then in the SaveButton.OnSelect I am using the following code:
CommentBox.CommentText=CommentBox.DefaultText;
CommentBox.OnSaveClick()
I know I'm not doing something right, but I'm not sure what that is. Can anyone lend a bit of insight as to what my problem is?
Thanks for looking
Kevin