Would the following be something that could easily be implemented in MODx or likely need it’s own module with custom database fields?
I’m wanting to implement a form to submit a feature request that is then:
- Email sent to be approved by a manager
- link in email back to the submission needing approval.
- once approved, display on a public page (the easiest part)
- a vote button on each entry that changes status out after pressing
- an indication of how many votes on each suggestion
- email notification sent to the submitter when getting a vote.
- the ability for managers to review, update, or delete cards when necessary.
Submissions and votes aren’t super critical so it isn’t necessary to tie into a user backend. It just needs to be inconvenient enough that they aren’t easily punching the vote button 100 times.
I know it is already possible in MODx to create a resource from a form submission and obviously to display those resources on the website. What I’m not as certain about is how to track votes or send emails when the various steps are happening.
Does anyone know of a snippet or plugin that already handles this sort of scenario?
I don’t know any MODX extra that exactly does what you want. Maybe an extra like Polls could be used (or adapted to your needs).
If you want to create a custom solution, I would use MIGXdb to create custom database tables (for the “suggestions” and “votes”) and the manager page (to edit the data).
Additionally I’d probably use FormIt and custom FormIt hooks to create database entries and send emails.
Here is the documentation of how to send emails with MODX (if the built-in FormIt hooks don’t suffice).
1 Like
Is there a way to create a custom resource type that lets me rename and arrange fields in the manager’s editing page? So instead of all the unnecessary fields it is a mix of MODx defaults and custom TVs on a single tab?
Example:
Title [[*pagetitle]]
Description [[*description]]
Updates [[*introtext]]
Email [[*tv.email]]
Phone [[*tv.phone]]
Date [[*publishedon]]
Publish [[*published]]
All the other fields would be on their normal tabs.
It’s much simpler to use Form Customization for that (moving TVs and renaming fields), than to create a custom resource type.
In the MODX manager, go to → “Form Customization”.
In the Form Customization docs, it talks about adding rules as the third stage Profiles > Sets > Rules. I don’t see an option to add a rule inside the set. Where do these get added?
https://docs.modx.com/current/en/building-sites/client-proofing/form-customization/rules
For example if I wanted a rule that would move the pagetitle field to a custom tab created in the regions section of the set.
In the set, in the first tab “Set Information and Fields”, there is a list of the fields (like “pagetitle” or “introtext”) where you can for example change the visibility or add a different label.
To customize TVs, use the third tab “Template Variables” and change the values in the list there.
That sounds like there’s no way to move the official fields around to different tabs. Just hide them and rename them.
Just move the TVs to one of the regions of the main tab (like for example “modx-resource-main-right-top”) and hide the fields you don’t need.