NetTalk Central

Author Topic: FLow control in a Memory Form  (Read 4048 times)

rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
FLow control in a Memory Form
« on: February 18, 2017, 03:12:40 AM »
Hi All,
I have an NT8 Memory form which I am using for Password Resets.  It has two fields - PW1 and PW2. It comes in with a value on the header ( from an e mail link) as the ID for reset.
Question1: How can I stay on the form and give them a message if PW1 <> PW2 ?  ( I could re-call the form but then I would loose the value passed in the header..)

Question2: If the reset record is > 30 minutes old ( from valued in header).  Can display a message.  Now - how do I close the Mem form - Normally I would post an event to the SAVE button but not sure that this is valid in Net Talk.  What is the correct method to tell the form to close.

TIA,
Ron Jolda

Mike McLoughlin

  • Full Member
  • ***
  • Posts: 126
    • View Profile
    • Clarion Templates
    • Email
Re: FLow control in a Memory Form
« Reply #1 on: February 18, 2017, 12:47:16 PM »
Not sure about Question 2 -  but for Q1 you could popup a message as in

        p_web.Script('ntAlert("Incorrect User/Password details - please try again");')

Mike
Mike McLoughlin

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: FLow control in a Memory Form
« Reply #2 on: February 20, 2017, 02:22:03 AM »
Hi Ron,

you can "store" incoming parameters into the session queue - then in the rest of your code make use of the session value.

p_web.StoreValue('SomeParameter')

This way you avoid a problem with the parameter disappearing after the _event_ has been processed. (The parameter only has a really short life-time so is almost certainly not available when you do your password comparison.)

>> Now - how do I close the Mem form

that's the wrong question. You don't "close" the mem form, you "go" somewhere else. Where do you want to go?

cheers
Bruce

rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Re: FLow control in a Memory Form
« Reply #3 on: February 20, 2017, 04:48:04 AM »
Hi Bruce,
Want to go to a BLANK page.
what is the code and where does it go to go to a blank page.
Thanks,
Ron