PHP code example of mediatis / form-logic

1. Go to this page and download the library: Download mediatis/form-logic 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/ */

    

mediatis / form-logic example snippets

javascript
form.if('not-empty', 'text-1').or().if('not-empty', 'text-2')
// ==
form.if('not-empty', 'text-1').or('not-empty', 'text-2')
javascript
form.if('not-empty', 'text-1')
  .and()
  .openBracket()
    .if('not-empty', 'text-2')
    .or()
    .if('not-empty', 'text-3')
  .closeBracket()
// ==
form.if('not-empty', 'text-1')
  .andOpenBracket()
    .if('not-empty', 'text-2')
    .or('not-empty', 'text-3')
  .closeBracket()
// ==
form.if('not-empty', 'text-1')
  .andOpenBracket('not-empty', 'text-2')
    .or('not-empty', 'text-3')
  .closeBracket()
javascript
form.if('not-empty', 'text-1')
  .orOpenBracket()
    .if('not-empty', 'text-2')
    .andOpenBracket()
      .if('not-empty', 'text-3')
      .or('not-empty', 'text-4')
    .closeBracket()
  .closeBracket()
  .then(function() {});
// ==
form.if('not-empty', 'text-1')
  .orOpenBracket()
    .if('not-empty', 'text-2')
    .andOpenBracket()
      .if('not-empty', 'text-3')
      .or('not-empty', 'text-4')
  .then(function() {});