• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Cron Plugin Use Case - Possible?

nbradshaw

Active Member
I have never used the cron fabrik plugin - so I am not very familiar with it...can you let me know if it would work in this use case?

I have a form that I would like to check if the "Severity Level" changes from one Severity to the next. I have a calc element that is on the form that is doing this calculation (based on certain criteria).

I would like to auto-submit the form every x min only if the original calc severity level value does not equal the new calc severity level. If the severity level changes, then submit the form...along with populating a text area that says "This ID has been escalated from severity X to severity Y" (this particular field has not empty validation).

Is this a good use case for the plugin? If not - is there another method that could work?

Thanks!
 
It'd be possible, but you'd have to use the PHP cron plugin and write the code that figures out the severity level. Basically, do in the cron job whatever it is your calc element does. Calc elements only change the value in the table when a form is submitted. So the cron code would have to look at each row in the table, perform the same code the calc does, and compare that to whatever is stored for the calc. If it is different, manually update the value in the calc'ed field for that row, and the text.

-- hugh
 
Thanks Hugh -

Can you help me write the php script - just so I can understand how it works?

I need to only submit the forms with this condition:
return '{ons_system___ons_status_raw}'==='1';

Do I need to use wget? How does the form actually get submitted?

I need to run all of the usual form plugins associated with the form (so that they kickoff just as if a user had submitted the form).

I am attaching my escalation if/else...I am assuming that I would need to change Return TO update form data?
 

Attachments

  • fabrik_auto_severity.txt
    4.9 KB · Views: 32
Hmm, what exactly do you mean by "submit the form"? I was assuming you just meant you needed to set that text with the escalation message, which I was going to suggest simply doing "by hand" with a query. There's no way of actually "submitting" a form through a cron job, such that it does everything that happens during a submit (like running plugins, etc).

-- hugh
 
ok, thanks. I was hoping there was a way to submit a form via cron that would only submit when certain conditions were met...sounds like this is not possible :(
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top