styled Confirmation msg in add an edit dialog

Questionsstyled Confirmation msg in add an edit dialog
andyvill asked 5 months ago

dear Abu.

 

in this moment, i use as confirmation msg in add or edit form this code:

 

$opt[“add_options”][“beforeSubmit”] = “function(){ if (confirm(‘Seguro que desea guardar los datos?’)==true) return [true,”]; else return [false,’No se han guardado los datos:<br>El usuario cancelo la acccion’]; }”;

$opt[“edit_options”][“beforeSubmit”] = “function(){ if (confirm(‘Seguro que desea guardar los datos?’)==true) return [true,”]; else return [false,’No se han guardado los datos:<br>El usuario cancelo la acccion’]; }”;

$opt[“beforeSaveRow”] = “function(){ if (confirm(‘Seguro que desea guardar los datos?’)==true) return [true,”]; else return [false,’Se ha cancelado el guardadoNo se han guardado los datos:<br>El usuario cancelo la acccion’]; }”;

 

exist a way to insert a styled confirmation msg has the deletion confirmation to add or edit operations??

 

sorry for my bad english.

thanks!

 

 

5 Answers
andyvill answered 5 months ago

i try to generate a styled confirmation msg with:

 

$grid[“edit_options”] = array(‘caption’=>’My Caption’,’msg’=>’Do Stuff ?’,’bSubmit’=>’Yes’,’bCancel’=>’Cancel’);

$grid[“add_options”] = array(‘caption’=>’My Caption’,’msg’=>’Do Stuff ?’,’bSubmit’=>’Yes’,’bCancel’=>’Cancel’);

 

butt not working

 

thnks!

Abu Ghufran Staff answered 5 months ago

Thanks for the update.

To open styled confirmation dialog box, demo is in package:

https://www.phpgrid.org/demo/demos/editing/dialog-layout.php (click on button: Custom Dialog)

Code: https://www.phpgrid.org/demo/demos/editing/dialog-layout.php

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
andyvill answered 5 months ago

dear Abu

I have a unique problem with this code, I can not make the message respond from the form, the form confirmation function immediately delivers the negative value. (when opening the window) I need the window to correctly evaluate the response.

please run the code and view the problem.

please i need your help thanks

 

 

Abu Ghufran Staff answered 4 months ago

Hi Andyvill,

I tested your code and understand your issue now. I’ll be updating you back after some working.

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
Your Answer

20 + 1 =

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!