Skip Navigation

[Resolved] add a button for accept & reject the application

This support ticket is created 4 years, 7 months 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 6 replies, has 2 voices.

Last updated by Minesh 4 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#1675929

Tell us what you are trying to do?
We are developing a registration form. We want to display the values of each applicant in to table using a view. We want to add a button for each row to accept & reject the application. How We can do it?

#1676441

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

I would like to have little more information. What values you want to display using view? Do you mean you want to display custom user fields with view?

We want to add a button for each row to accept & reject the application?
==>
Do you mean that you want to accept & reject the user that is registered or do you have other application form?

#1679431
Image 2020-06-28 at 9.47.42 AM.jpeg

We want to create a custom user field (boolean value) beside each row to accept and reject the applicants. The admin will check the information in the form (the user row), then he/she will decide whether to accept or reject the user by clicking on the approval button

#1679473

We also want to add a trigger to the button. In the database, we are storing 0 value. When the admin clicks on the button the action must be fired (changing the value in the database from 0 to 1).

#1680209

Minesh
Supporter

Languages: English (English )

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

Basically, if you want to add a custom user field, you can add a custom user field from:
=> Toolset => Custom Fields => User Fields (tab) => Add New Custom field group for users where you can add as many custom fields as you want

To update the user custom field, you need to create User form:
=> https://toolset.com/course-lesson/using-forms-to-create-an-edit-your-profile-page/

Again, you want to Approve the user you are listing with the view when you click on "Approve" button - correct?

Can you please try to make a user form that holds your custom user field value and let me know if you need further assistance.

#1681027

Sorry, you did not understand me. I have a post form that contains a custom field (checkbox). I set the default value to 0. When the applicants try to fill the form they cannot change this value. I used the toolset block to display this value (creating a view). I want to create a button in the view( just like the image that I attached in the above post). Whenever the admin clicks on that button, the value of the checkbox must directly be changed in the database from 0 to 1. It just like the Event concept in Java or a trigger in MySQL. I hope the idea is clear now.

#1682417

Minesh
Supporter

Languages: English (English )

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

The idea is clear but not the entity.

As you using applications as post type?
- As you mentioned in your last reply that "I have a post form that contains a custom field (checkbox)." - For which post type you have added the custom checkbox field.

If you are using Toolset form, you can add the Accept/Reject button using Toolset Form. You need to create Edit post form for and make sure that you have added the Submit button to your edit form.

Then, using Toolset from hook "cred_save_data" - you clan change the value of your custom field.
=> https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

If you do not know how to do it, please share problem URL and access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.