FormCalculationSettings.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php if ( ! defined( 'ABSPATH' ) ) exit;
  2. return apply_filters( 'ninja_forms_from_calculation_settings', array(
  3. /*
  4. * Calculation
  5. */
  6. 'calculations' => array(
  7. 'name' => 'calculations',
  8. 'type' => 'option-repeater',
  9. 'label' => ' <a href="#" class="nf-add-new">' . __( 'Add New', 'ninja-forms' ) . '</a>',
  10. 'width' => 'full',
  11. 'group' => 'primary',
  12. 'tmpl_row' => 'tmpl-nf-edit-setting-calculation-repeater-row',
  13. 'columns' => array(
  14. 'name' => array(
  15. 'header' => __( 'Variable Name', 'ninja-forms' ),
  16. 'default' => '',
  17. ),
  18. 'eq' => array(
  19. 'header' => __( 'Equation', 'ninja-forms' ),
  20. 'default' => '',
  21. ),
  22. 'dec' => array(
  23. 'header' => __( 'Precision', 'ninja-forms' ),
  24. 'default' => '2',
  25. ),
  26. ),
  27. 'use_merge_tags' => array(
  28. 'exclude' => array(
  29. 'user', 'system', 'post'
  30. ),
  31. ),
  32. ),
  33. ));