Released: Aphrodite Starter Kit UI Text Input

Ah most likely that’s the issue, you need to sign in with your email address. I can’t find your account with your username.

@Leonidas Hi,

How can we fetch value from user?

console.log("Val1 = ", this.textBox1.script.aphroditeTextInput.inputElement.value );
console.log("Val2 = ", this.textBox2.script.aphroditeTextInput.inputElement.value );

Is this correct way?

Also, I think there is bug with textbox field…
Click and type “abc”
Click out side and again click same box and type “123”

It is showing “123abc”. It should be “abc123”

You can do it like that, or even simpler in any script of yours you can subscribe to the following event:

this.app.on('AphroditeTextInput:[your-input-id-attribute]:value', function(inputValue){
   
}, this);

Thanks for the reporting this bug, we will take a look at it.

1 Like

image

this.app.on('AphroditeTextInput:[username]:value', function(inputValue){
    console.log("output = ", inputValue);
}, this);

So is this correct? :thinking: :thinking:
I cant see output

Almost there, remove the brackets, it was for demonstration only:

this.app.on('AphroditeTextInput:username:value', function(inputValue){
    console.log("output = ", inputValue);
}, this);
1 Like

@Leonidas Thank you very much for quick reply and help! :grinning:

this.app.on('AphroditeTextInput:username:value', function(inputValue){
    this.nameVal = inputValue;
    console.log("output1 = ", this.nameVal);
}, this);

this.app.on('AphroditeTextInput:password:value', function(inputValue){
    this.passVal = inputValue;
    console.log("output2 = ", this.passVal);
}, this);

Works Great! :ok_hand: :ok_hand: :ok_hand:

Thanks again! :grinning:

1 Like

Hello @Leonidas

On mobile device…
I came to know that part of code does not work some times… Even after entering the value in the text field…

How it can be resolved?

Hi @Ketan_ATA,

I am not sure I’ve seen that before. Send me on a DM a build if you are able that reproduces the issue, to take a look.

1 Like

@Leonidas Details has been shared with you in DM.

1 Like

Hi @Leonidas,
For my project, Device Pixel Perfect Ratio is Enabled (it is mandatory). I would like to know, does your starter package will work with this condition?

Hi @Faisal, yes, the example project has device pixel ratio enabled. We didn’t have any problem with that being enabled.

Hello @Leonidas

Hope you are doing great!

I have question related android input view and iPhone iOS input view.

Android (Keyboard fine)

But on iPhone IOS (Keyboard is overlapping)

How it can be fixed? Please help…

@Ketan_ATA The library belongs to @commention so you will have to speak with them.

@yaustar Thanks for information.
@commention Can you please help?

Which library is that, I think it’s not my library @Ketan_ATA

@commention Oh my bad, I thought this was your UI text elements thread (sorry!)

@Ketan_ATA Sorry, yes it is @Leonidas library so you will need to talk to him. I believe he is away for a few days.

1 Like

@commention Ohh Ok, Sorry about that.

@yaustar No problem, I can understand.

@Leonidas Can you please help? How it can be handled?

Hey, sorry I was away.

That issue comes from how android vs ios handle page resizing when the device keyboard shows up for a given page. It’s not specific to this project or PlayCanvas.

I think you may be able to set that behaviour using some meta tags in the html header, most likely that will require self hosting to be able to change the .html file.

Try doing a search online about that, I’ll give it a try to and let you know if I find something.

1 Like

I tried out the example project, there is no vertical blinking bar to indicate where the next letter will be, and the backspace button doesn’t work either to remove characters…

Thanks for the comment, yes there is no blinking bar.

Indeed there is an issue with backspace, it works but it seems when you get back to a field the cursor is positioned at the front of the text. Hence it can’t really go back, we will see to it to get it fixed.