Skip Navigation

[Resolved] How to add approve button to approve the application

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to add approve button to approve the application with post listing using view/block

Solution:
You can build the edit form and add the approve button to it within the view loop.

You can find the proposed solution in this case with the following reply:
=> https://toolset.com/forums/topic/how-to-add-approve-button-to-approve-the-application/page/2/#post-1863373

Relevant Documentation:

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 18 replies, has 2 voices.

Last updated by Minesh 4 years ago.

Assisted by: Minesh.

Author
Posts
#1863373

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

What I've done is added the following code to the "update-vu-registration-form" form's "Enter the message to display instead of the form. " section.
=> /wp-admin/post.php?post=4753&action=edit

[wpv-conditional if = "( '[types field='approved' output='raw'][/types]' eq '1' )" ]
Approved 
[/wpv-conditional]
[wpv-conditional if = "( '[types field='approved' output='raw'][/types]' eq '0' )" ]
Un-Approved
[/wpv-conditional]

Also, I've set the form to submit with Ajax.

Then I've created a fresh page and added the view "vu-registration-view-squ" to it that contains the form.

As you can see with the following video that I capture, it seems working as expected, When I approve user it shows "Approved" text and when I unapprove it, it shows "Un-Approved" message.
=> hidden link

#1864215

My issue is resolved now. Many Thanks to you for your support.

#1891309
I got.JPG
I expect.JPG

Hi Minesh

Now we need to apply the same scenario but with two radio buttons (Accept & Reject) as on the attached image. How to apply it on radios instead of Checkboxes.

I have added this code to the update post form, where (accept) is the name of the radio buttons.

[wpv-conditional if = "( '[types field='accept' output='raw'][/types]' eq '1' )" ]
Approved
[/wpv-conditional]
[wpv-conditional if = "( '[types field='accept' output='raw'][/types]' eq '2' )" ]
Rejected
[/wpv-conditional]

but when I submit a new post.
I expect to see two radio buttons, when I select one of them and submit, a message of Approved or rejected appearing.
But what I got is: the message (Approved) appears by default after each new submission.

Please Assist me.

#1891351

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

May I kindly ask you to open a new ticket with every new question you may have. This will help other users searching on the forum as well as help us to write correct problem resolution summery.