start_controls_section( 'give_form_grid_settings', [ 'label' => __('GiveWP Form Grid Widget', 'give'), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'forms_cats_tags', [ 'label' => __('Collection Method', 'give'), 'type' => \Elementor\Controls_Manager::SELECT, 'description' => __('Would you like to show forms by ID, by their Categories, or by their Tags?', 'give'), 'options' => [ 'forms' => __('Forms', 'give'), 'cats' => __('Categories', 'give'), 'tags' => __('Tags', 'give'), ], 'default' => 'forms', ] ); $this->add_control( 'all_forms', [ 'label' => __('Show All Forms?', 'give'), 'type' => \Elementor\Controls_Manager::CHOOSE, 'description' => __('Do you want to show all forms in your grid?', 'give'), 'options' => [ 'yes' => [ 'title' => __('Yes', 'give'), 'icon' => 'fa fa-check', ], 'no' => [ 'title' => __('No', 'give'), 'icon' => 'fa fa-times-circle', ], ], 'default' => 'yes', 'toggle' => true, 'condition' => [ 'forms_cats_tags' => 'forms' ] ] ); $this->add_control( 'form_ids', [ 'label' => __('Show by Form IDs', 'give'), 'type' => \Elementor\Controls_Manager::TEXT, 'description' => __('Place the form IDs you\'d like to show in your grid here, separated by commas.', 'give'), 'condition' => [ 'all_forms' => 'no', 'forms_cats_tags' => 'forms' ] ] ); $this->add_control( 'cats', [ 'label' => __('Show by Form Categories', 'give'), 'type' => \Elementor\Controls_Manager::TEXT, 'description' => __('Place the form category IDs you\'d like to show in your grid here, separated by commas.', 'give'), 'condition' => [ 'forms_cats_tags' => 'cats' ] ] ); $this->add_control( 'tags', [ 'label' => __('Show by Form Tags', 'give'), 'type' => \Elementor\Controls_Manager::TEXT, 'description' => __('Place the form category IDs you\'d like to show in your grid here, separated by commas.', 'give'), 'condition' => [ 'forms_cats_tags' => 'tags' ] ] ); $this->add_control( 'exclude', [ 'label' => __('Exclude Forms', 'give'), 'type' => \Elementor\Controls_Manager::TEXT, 'description' => __('List the form IDs that you want excluded from this Form Grid.', 'give'), ] ); $this->add_control( 'forms_per_page', [ 'label' => __('Forms Per Page', 'give'), 'type' => \Elementor\Controls_Manager::SELECT, 'description' => __('The number of forms to show in the grid before the "Load More" button appears.', 'give'), 'options' => [ '1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12', ], 'default' => '12' ] ); $this->add_control( 'paged', [ 'label' => __('Show Pagination', 'give'), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => __('Show', 'give'), 'label_off' => __('Hide', 'give'), 'default' => 'yes', ] ); $this->add_control( 'orderby', [ 'label' => __('Order By', 'give'), 'type' => \Elementor\Controls_Manager::SELECT, 'description' => __('The element which the order will be determined by.', 'give'), 'options' => [ 'date' => __('Date Created', 'give'), 'title' => __('Form Name', 'give'), 'amount_donated' => __('Amount Donated', 'give'), 'number_donations' => __('Number of Donations', 'give'), 'menu_order' => __('Menu Order', 'give'), 'post__in' => __('Form ID', 'give'), 'closest_to_goal' => __('Closest to Goal', 'give'), ], 'default' => 'date' ] ); $this->add_control( 'order', [ 'label' => __('Order By', 'give'), 'type' => \Elementor\Controls_Manager::SELECT, 'description' => __('The order the donors will be displayed in according to the "Order By" field chosen.', 'give'), 'options' => [ 'desc' => __('Descending', 'give'), 'asc' => __('Ascending', 'give') ], 'default' => 'desc' ] ); $this->add_control( 'columns', [ 'label' => __('Number of Columns', 'give'), 'type' => \Elementor\Controls_Manager::SELECT, 'description' => __('The number of columns to display. Note that "Best Fit" will always stretch to fill the available width that the donor wall is placed within.', 'give'), 'options' => [ 'best-fit' => __('Best Fit', 'give'), '1' => '1', '2' => '2', '3' => '3', '4' => '4', ], 'default' => 'best-fit' ] ); $this->add_control( 'show_title', [ 'label' => __('Show Form Title', 'give'), 'type' => \Elementor\Controls_Manager::SWITCHER, 'description' => __('Show/Hide the form title.', 'give'), 'label_on' => __('Show', 'give'), 'label_off' => __('Hide', 'give'), 'default' => 'yes', ] ); $this->add_control( 'show_excerpt', [ 'label' => __('Show Form Excerpt', 'give'), 'type' => \Elementor\Controls_Manager::SWITCHER, 'description' => __('Show/Hide the form excerpt.', 'give'), 'label_on' => __('Show', 'give'), 'label_off' => __('Hide', 'give'), 'default' => 'yes', ] ); $this->add_control( 'excerpt_length', [ 'label' => __('Excerpt Length', 'give'), 'type' => \Elementor\Controls_Manager::TEXT, 'description' => __('Excerpt Length.', 'give'), 'condition' => [ 'show_excerpt' => 'yes' ] ] ); $this->add_control( 'show_goal', [ 'label' => __('Show Form Goal', 'give'), 'type' => \Elementor\Controls_Manager::SWITCHER, 'description' => __('Show/Hide the form goal.', 'give'), 'label_on' => __('Show', 'give'), 'label_off' => __('Hide', 'give'), 'default' => 'yes', ] ); $this->add_control( 'show_featured_image', [ 'label' => __('Show Form Featured Image', 'give'), 'type' => \Elementor\Controls_Manager::SWITCHER, 'description' => __('Show/Hide the form featured image.', 'give'), 'label_on' => __('Show', 'give'), 'label_off' => __('Hide', 'give'), 'default' => 'yes', ] ); $this->add_control( 'image_size', [ 'label' => __('Image Size', 'give'), 'type' => \Elementor\Controls_Manager::TEXT, 'description' => __('Featured image size. Default "medium". Accepts WordPress image sizes.', 'give'), 'condition' => [ 'show_featured_image' => 'yes' ] ] ); $this->add_control( 'image_height', [ 'label' => __('Image Height', 'give'), 'type' => \Elementor\Controls_Manager::TEXT, 'description' => __('Featured image height. Default "auto". Accepts valid CSS heights', 'give'), 'condition' => [ 'show_featured_image' => 'yes' ] ] ); $this->add_control( 'show_donate_button', [ 'label' => __('Show Donate Button', 'give'), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => __('Show', 'give'), 'label_off' => __('Hide', 'give'), 'default' => 'yes', ] ); $this->add_control( 'donate_button_text_color', [ 'label' => __('Donate Button Text Color', 'give'), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#69B86B', 'condition' => [ 'show_donate_button' => 'yes' ], ] ); $this->add_control( 'display_style', [ 'label' => __('Display Type', 'give'), 'type' => \Elementor\Controls_Manager::SELECT, 'description' => __('Choose the behavior when a form is clicked on within the grid.', 'give'), 'options' => [ 'redirect' => __('Redirect to the single Form Page.', 'give'), 'modal_reveal' => __('Open the form in a modal window.', 'give'), ], 'default' => 'redirect' ] ); $this->add_control( 'give_form_grid_info', [ 'label' => '', 'type' => \Elementor\Controls_Manager::RAW_HTML, 'content_classes' => 'give-info', 'raw' => '
' . __('GIVEWP FORM GRID WIDGET', 'give') . '
' . __('Visit the GiveWP Docs for more info on the GiveWP Form Grid.', 'give') . '