Download the PHP package digitaladapt/vigilant-form without Composer

On this page you can find all versions of the php package digitaladapt/vigilant-form. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package vigilant-form

vigilant-form

for Form Scoring and Processing.

Work In Progress, functional and actively in use in production, but needs clean up and more documentation.

So what is VigilantForm?

VigilantForm is my attempt to keep junk form submissions from getting put in my CRM.

So rather then putting form submissions directly into my CRM, I push them to VigilantForm.

VigilantForm scores the submission, based on whatever scoring logic you choose; some examples include:

After scoring is complete, the form submission is graded, and you can take different custom actions depending on the grade.

For example, I push quality form submissions into my CRM, but form submissions which need review go to Discord, with links to approve/reject; meanwhile junk form submissions get logged to a file for periodic review, and spam form submsissions quietly get trashed.

The process of looking up geo-location of the ip address, calcuating the score, and running the custom processing is asynchronous from the form submission. So the API for storing a form submission should always returns promptly, and the extra processing can start being worked on nearly instantaneously.

So how do you set it up?

Create the project, configure the database and access keys, migrate the database, queue worker, setup apache/nginx, and customize process and scoring files to suite needs.

Within the .env file, update the DB_* values to the database you want to use.

You also need set CLIENT_ID and CLIENT_SECRET to long unique strings, which you will need when you go to store a form submission into the system.

If you want to lookup geo-location of the IP Addresses of form submissions, setup a (free or paid) access key with ipstack.com, which goes into IPSTACK_key. Otherwise you can not score based on continent/country/region.

Create the database tables by running the migrate command:

You'll also need to setup a queue worker: https://laravel.com/docs/6.x/queues Recommend you use redis and set QUEUE_CONNECTION to "redis", but the default database will work just fine. While it's strongly recommended to come up with a way to ensure the queue:work process is always running, a simple cron can be a nice quick way to test things out, before setting up something more robust:

Setup your web server, root directory is the public folder within the project. if you are using nginx, add a location fallback of index.php, like so:

If you visit the project in your web browser, you should expect to get a 405 Method Not Allowed. The root route only permits POST requests, for storing form submissions.

Websites which want to push form submissions into your instance of vigilant-forms can use the library digitaladapt/vigilant-form-kit. https://packagist.org/packages/digitaladapt/vigilant-form-kit Which will help you collect and submit the form and meta data. The API requirements for vigilant-form submissions can be found in app/Http/Requests/SubmissionStoreRequest.php.

Notes

How Processing Works

By default within the process folder, there is a php file for each grade that can result from grading. Those files by default do nothing, but can be leveraged to perform whatever operations are desired upon a form submission being given a particular grade. Given that it is a php file within a Laravel framework project, you can write whatever code you need, but some utilities have been included.

For example, you could send the details of a submission via a Discord webhook and Email: Make sure to update your .env for sending emails, before attempting to use the Mail Facade.

How Scoring Works

The higher the score, the more likely the content is spam/junk. The score gets broken down into 5 grades:

The scoring.php file determines what logic is applied to determine the score for each submission. The file returns an array of rules, allowing you to specify which fields or property to check, what type of check to perform, and how many points to add to the score, if the submission matches. It is also possible to limit the maximum score, if desired, and rules may also have negative scoring, improving the score for good content.

each rule must contain: "name" what you want to call this rule, "score" which determines how many points are given for each volation, either "fields" or "property" (what data to review),

optionally a "limit" (integer) may be specified, if the rule matches, the maximum score that the form submission can be is the given limit.

Note: all checks performed are case-insensative (including regexp), also note all checks work on utf-8 data (length is characters not bytes), finally: for all field checks, if the form didn't contain the specified field, the submission can not match the rule by that field (ever); this means that only some forms ask for a field, a rule only applies to submissions from forms which contained that field.

Example: two forms, both have "email", but only one has "phone", a rule which gives points for a "missing" "phone" will not give points to any submission from the form without a "phone" field.

Example scoring.php:

Accounts

In your processing, if you want to store supplemental information, one place that can be done is at the account level. All use of the account and account_fields is left up to you, since it is business specific logic.

For example, after I push quality submissions into my CRM, I get some Account meta data, so I can include that in an Discord chat:


All versions of vigilant-form with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.0
ext-json Version *
aws/aws-sdk-php Version ^3.133
erusev/parsedown Version ^1.7
fideloper/proxy Version ^4.0
guzzlehttp/guzzle Version ^6.5
jenssegers/agent Version ^2.6
laravel/framework Version ^6.2
laravel/tinker Version ^2.0
nesbot/carbon Version ^2.30
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package digitaladapt/vigilant-form contains the following files

Loading the files please wait ....