A field to be … filled by itself !!!

3 posts by 2 authors in: Forums > CMS Builder
Last Post: May 2, 2016   (RSS)

By Damon - May 2, 2016

Hi,

So it sounds like you want the user to log into CMS Builder, create a patient record and have a list field show one random treatment option to choose that is from a list of treatments. Then, after the user saves the record, with the random selected treatment, they can no longer change the random selected treatment (only an admin can).

Here is what is needed:
1. a MySQL query to return a single random result from a treatment list that already exists in the database. The treatment list can be created using a section editor for "Treatments" and adding the available treatment options.
2. to protect the treatment field from later being edited by a user, it needs to be set as Admin access only. This prevents the user from seeing and entering a treatment option though. The solution is to have a custom plugin written that will automatically save the random treatment selection when the record. The code could be added to the page so the user could see the treatment option selected for that patient but not be able to edit it.

When creating a new patient record, a user will also not be able to refresh the browser multiple times to get another randomly created treatment option.

How does this sound? The next step is to email Ross at consulting@interactivetools.com and confirm the details and he will be able put together a quote for you.

Please let me know if you have any questions.

Thanks!

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By andreasml - May 2, 2016

Hi Damon

I think that this is exactly what is needed! Besides the plugin, i think that i will also need the MySQL query so as to be sure that everything is working properly.

Kind regards

Andreas