Your IP : 3.22.208.99


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

block.php000064400000001233150062045160006345 0ustar00<?php
/**
 * PHP render form Multichoice Block.
 *
 * @package SureForms.
 */

namespace SRFM\Inc\Blocks\Multichoice;

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

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

/**
 * Multichoice 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 Multichoice_Markup( $attributes );
			ob_start();
			// phpcs:ignore
			echo $markup_class->markup();
		}
			return ob_get_clean();
	}
}
block.json000064400000002763150062045160006540 0ustar00{
	"apiVersion": 2,
	"name": "srfm/multi-choice",
	"title": "Multiple Choice",
	"description": "Displays a SureForm Multi-Choice Field",
	"category": "sureforms",
	"keywords": [ "multi-choice", "quiz", "multi", "sureforms" ],
	"textdomain": "sureforms",
	"supports": {
		"reusable": false,
		"html": false
	},
	"example": {
		"attributes": {
			"preview": true
		}
	},
	"attributes": {
		"preview": {
			"type": "boolean",
			"default": false
		},
		"block_id": {
			"type": "string"
		},
		"required": {
			"type": "boolean"
		},
		"singleSelection": {
			"type": "boolean"
		},
    "minValue": {
      "type": "number"
    },
    "maxValue": {
      "type": "number"
    },
    "verticalLayout": {
			"type": "boolean"
		},
		"options": {
			"type": "array",
			"default": [
				{
					"optionTitle": "Option 1",
					"icon": "",
          "image": ""
				}
			]
		},
		"fieldWidth": {
			"type": "number",
			"default": 100
		},
		"choiceWidth": {
			"type": "number",
			"default": 50
		},
		"label": {
			"default": "Multi Choice",
			"type": "string",
			"selector": "input"
		},
		"help": {
			"type": "string",
			"default": ""
		},
		"style": {
			"type": "string",
			"default": "buttons"
		},
		"errorMsg": {
			"type": "string",
			"default": ""
		},
		"formId": {
			"type": "number",
			"default": ""
		},
		"isConditionalLogic":{
			"type":"boolean",
			"default":false
		},
    "slug":{
			"type":"string",
			"default":""
		},
    "optionType": {
      "type": "string",
      "default": "icon"
    }
	}
}