How to update grid options $opts['edit_options']['bottominfo']

QuestionsHow to update grid options $opts['edit_options']['bottominfo']
CJ asked 2 years ago

I have a grid with an action button within the child grid. When the user clicks it, an edit form is presented, and I use the edit_options to display important information to the user. When the submit their changes, and click another button in the grid, the same bottom info is shown. I need to change it to something else (a PHP function already has the updated text)…how do I update the grid option? Here is what I have now:

$opts['edit_options']['bottominfo'] = "To make new sample code:<br><b>{$rechk_vars['sample_code']}</b><br>";

3 Answers
CJ answered 2 years ago

Sorry…forget "child grid". Just a grid…

CJ answered 2 years ago

Was able to fix the problem myself. Ended up using the "edit_options"'s "afterShowForm", and associate that option with a client-side script that loaded a new PHP page and replaced the bottominfo with the desired data. edit option looked something like this:

$opts['edit_options']['bottominfo'] = "RESULT";
$opts["edit_options"]["afterShowForm"] = 'function(formid) {
$.post("/path/to/phpfile/myresultmsg.php", function(data){

The myresultmsg.php file simply returned the text I was needing to show to the user.

Abu Ghufran answered 2 years ago

Thanks for sharing.

Your Answer

11 + 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!