Page 1 of 2

Making a password screen?

Posted: Sun Mar 25, 2012 10:31 pm
by meyrett

Does anyone know how to make a password screen? Something like when the user opens the app, the first screen is a login screen (username and password)?
thanks very much


Making a password screen?

Posted: Sun Mar 25, 2012 11:43 pm
by maxkatz

Here you go:

http://tiggzi.com/view/a9802297-fd7b-...

Grid, with two columns/rows. Button after the grid.

Image


Making a password screen?

Posted: Mon Mar 26, 2012 12:15 am
by meyrett

thanks so much... I see you have made this, but how do I see how it was built? All I see is that you built one (sorry for being so dense)


Making a password screen?

Posted: Mon Mar 26, 2012 12:24 am
by maxkatz

Drag and drop a grid
Add one row - you get two columns, two rows
Drag and drop Label/Input components.
Add a button at the end.

Have you tried one of the getting started guides: http://help.tiggzi.com?

You can also watch our recent webinars: http://youtube.com/tiggzi.


Making a password screen?

Posted: Mon Mar 26, 2012 12:39 am
by meyrett

Thanks much.
Yes, the basics are easy to understand.
I have read all the get started guides and have watched many videos. I am generally doing fine, thanks for your guidance.
I can make the grid and the button easy.
My issue is how do I restrict the ability for the button to move you forward to the home screen unless the password is correct??
best


Making a password screen?

Posted: Mon Mar 26, 2012 2:57 am
by maxkatz

You would need to connect your app to some service via REST, send the login information. If the information is correct, you navigate to the next page. If not, you can display an error message.

You can also put some test data for login in JavaScript without invoking any remote services.

Here is how to navigate:
http://help.gotiggr.com/documentation...


Making a password screen?

Posted: Mon Mar 26, 2012 3:05 am
by meyrett

Thanks. I don't want to invoke remote services. Do you know the javascript text so I can do it that way? Thanks so much. This is the best support I've ever seen!


Making a password screen?

Posted: Mon Mar 26, 2012 3:54 am
by maxkatz

On button you have two events:
1) Run Custom JavaScript (code below)
2) Navigate to Page

code
var username = Tiggr('mobiletextinput1').val();
var password = Tiggr('mobiletextinput2').val();

if (username != 'user' && password != 'pass'){
alert ('Incorrect username and password.');
return;
}
/code

http://tiggzi.com/view/a9802297-fd7b-...


Making a password screen?

Posted: Mon Mar 26, 2012 4:01 am
by meyrett

thanks.
I did that and it works great (but it also works for incorrect passwords).


Making a password screen?

Posted: Mon Mar 26, 2012 4:05 am
by meyrett

At first, I tried 2 events on 1 click....
a. run javascript
b. navigate to home page
(that gives me home page even if i put in wrong password).

When I try to put in 2 seperate events
the first event is on "click" to run javascipt
Is the 2nd event (to navigate to home apge) on "blur", "focus" "value change"??