PHP code example of jt782 / require-read-terms-php

1. Go to this page and download the library: Download jt782/require-read-terms-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jt782 / require-read-terms-php example snippets


use Seven82Media\RequireReadTerms\FormTerms;

$terms = new FormTerms(
    '#target-form-id',
    '<p>terms go here</p>'
);

$terms->loadModalDisplayButton()

$terms->displayButton()

$terms->loadScript()

$terms->checkboxFieldTarget("#agree-to-terms");


    $terms = new FormTerms('.test-form', '<p>Term content goes here</p>');
    $terms->checkboxFieldTarget("#agree-to-terms");