Your IP : 13.59.51.100


Current Path : /home/ephorei/www/wp-includes/images/media/q2m9hb/
Upload File :
Current File : /home/ephorei/www/wp-includes/images/media/q2m9hb/input.tar

block.json000064400000002766150062040220006533 0ustar00{
  "name": "srfm/input",
  "title": "Text",
  "description": "Displays a SureForm Text Field",
  "category": "sureforms",
  "keywords": [
    "text",
    "input",
    "custom",
    "field",
    "name"
  ],
  "textdomain": "sureforms",
  "supports": {
    "reusable": false,
    "html": false
  },
  "example": {
    "attributes": {
      "preview": true
    }
  },
  "attributes": {
    "preview": {
      "type": "boolean",
      "default": false
    },
    "block_id": {
      "type": "string"
    },
    "defaultValue": {
      "type": "string",
      "default": ""
    },
    "required": {
      "type": "boolean",
      "default": false
    },
    "isUnique": {
      "type": "boolean",
      "default": false
    },
    "duplicateMsg": {
      "type": "string",
      "default": ""
    },
    "placeholder": {
      "type": "string",
      "default": ""
    },
    "fieldWidth": {
      "type": "number",
      "default": 100
    },
    "label": {
      "type": "string",
      "default": "Text Field"
    },
    "help": {
      "type": "string",
      "default": ""
    },
    "errorMsg": {
      "type": "string",
      "default": ""
    },
    "textLength": {
      "type": "number",
      "default": 100
    },
    "formId": {
      "type": "number",
      "default": ""
    },
    "isConditionalLogic": {
      "type": "boolean",
      "default": false
    },
    "inputMask": {
      "type": "string",
      "default": "none"
    },
    "customInputMask": {
      "type": "string",
      "default": ""
    }
  }
}block.php000064400000001175150062040220006342 0ustar00<?php
/**
 * PHP render form Text Block.
 *
 * @package SureForms.
 */

namespace SRFM\Inc\Blocks\Input;

use SRFM\Inc\Blocks\Base;
use SRFM\Inc\Fields\Input_Markup;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Address Block.
 */
class Block extends Base {
	/**
	 * Render the block
	 *
	 * @param array<mixed> $attributes Block attributes.
	 *
	 * @return string|bool
	 */
	public function render( $attributes ) {
		if ( ! empty( $attributes ) ) {
			$markup_class = new Input_Markup( $attributes );
			ob_start();
			// phpcs:ignore
			echo $markup_class->markup();
		}
		return ob_get_clean();
	}
}