Add approval to submitted forms

Permalink
Hi All,

I hope someone can please help.
i created a form on one of my pages, and an express list underneath that shows the submitted forms data.
what i need is to add an approval step before the data is shown on the list below.

Example : once the user fill the data in and click submit, the Admin will receive the form data to view and click Approve before guests can see this data in the list.

How can i add this approval step ? i tried (Work Flows) but it's not for that.

 
mnakalay replied on at Permalink Reply
mnakalay
There's no automated way of doing this at the moment.

You would have to either custom code it or use some creative hacks that would require some manual work in the background.

For instance, using 2 identical entities. One where the data is submitted for review and the other used to show entries on the front page. The admin would have to review in one entity and, if satisfied, add the data manually to the other.
Beeso replied on at Permalink Reply
Thanks Mnakalay,

This's exactly what i did but i was hoping there's a way to stop the manual re-enty of data by the admin :/
drumrby replied on at Permalink Reply
drumrby
I am looking to do the exact same thing.

Mnakalay, I know you said it would need to be custom coded, as there is nothing built into Concrete5 to make this happen.

Any idea where someone would start on a custom code to do this? I don't know where the custom code would be implemented.
mnakalay replied on at Permalink Reply
mnakalay
You would have to override the submitting form controller and you would also need to override the list block controller.
I didn't really think about it but your express entity would need to have an extra "approved" field

You would modify the form controller to NOT show an input for that field and you would set its value yourself manually to false "not approved"

You would then modify the controller for the list block to filter results by that value and show only the approved ones.

One way to avoid having to override the form controller would be to create a new "hidden input" attribute type that you could use instead to set that approved value to false.
studio108 replied on at Permalink Reply
studio108
Hi mnakalay,

I see that an express workflow option is still not available so would your hidden data attribute add-on (https://www.concrete5.org/marketplace/addons/hidden-data-attributes-for-express/) solve the issue of only displaying approved form submissions?

If so, how would I need to go about it?

Ideally, I would like someone to receive a notification email of a form submission prompting them to login to check and approve that the submission is OK to display.

Many thanks in advance.
mnakalay replied on at Permalink Best Answer Reply
mnakalay
Hi studio108

Using my add-on you would add a Hidden Boolean attribute type to your entity and make it unchecked by default. You'd also allow it to be modified after submission.

When adding your express entry list block to your page you would filter by that attribute to show only entries for which the attribute is checked.

On submission, the value would always be unchecked. You could then check it and save it from the dashboard whenever you'd want to mark a submission as approved.
studio108 replied on at Permalink Reply
studio108
Thank you for your reply and great support as ever.
That makes perfect sense!

I am sure other C5 users may find this information helpful also.