NetTalk Central

Author Topic: Change form confirmation globally  (Read 3414 times)

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Change form confirmation globally
« on: September 26, 2014, 12:39:41 AM »
Hallo,


I need to translate alert confirmation on forms like:

1.) Are you sure you want to delete this record?
2.) Are you sure you want to cancel the changes?

I see on form embed there is a new routine "ntForm" where I could change this confirmation text.
Do I have to go and change this on every form? or is there a global solution?

Thank you,
Robert

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Change form confirmation globally
« Reply #1 on: September 28, 2014, 10:21:25 PM »
it goes through the Translate procedure in WebHandler.
So you can translate it globally there.

cheers
Bruce

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: Change form confirmation globally
« Reply #2 on: September 28, 2014, 11:12:53 PM »
Thanks Bruce!

And how to change this code to translate this:

 p_web.SetOption(loc:options,'confirmDeleteMessage',p_web.translate('Are you sure you want to delete this record?'))
 p_web.SetOption(loc:options,'yesDeleteText',p_web.translate('Delete'))
 p_web.SetOption(loc:options,'noDeleteText',p_web.translate('No'))


Thank you,
Robert

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: Change form confirmation globally
« Reply #3 on: September 28, 2014, 11:33:58 PM »
I try this and it works. It's ok in this way?

   CASE p_String
    OF 'Are you sure you want to delete this record?'
        RETURN 'Sunteti sigur ca doriti sa stergeti acesta introducere?'
    OF 'Are you sure you want to cancel the changes?'
        RETURN 'Sunteti sigur ca doriti sa renuntati la modificarile facute?'
   END

thank you,
Robert

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Change form confirmation globally
« Reply #4 on: September 29, 2014, 12:01:48 AM »
yes. exactly.