Recent Topics

Feature request: Dynamic Input Groups

Started by on Jan 02, 2018 – Contents updated: Jan 08, 2018

Jan 02, 2018 17:46    

I would like to put this feature on my wishlist and do believe it will be a great addition to b2evolution. Now I know we don't always get what we want, but hey, if you don't ask, you won't get...

As always, my request is to enhance settings (plugins, widgets, skins, col-settings, user-settings, ect...) and this is very similar to Dynamic Sets, except I would like for this NOT to be wrapped in a Fieldset, but rather in a group...

The idea here is to have dynamic settings which will add a few items only and in a group and that works very similar as that found in user profile preference settings:

Feature request: Dynamic Input Groups

It must have a selection select [#2], and an Add button [#1] and a DELETE button [#3] that will be added next to the input_group || input_input. The exception is how it is defined:

function GetDefaultSettings( & $params )
	{
		return array(
			
	
			
			'plugin_input_group' => array(
				'label' => T_('Set'),
				'note' => T_('Your note'),
				'multiple' => true, // or false .... Supported ...  ?
				'type' => 'NEW_TYPE',
				'options' => array( // Select List like $Form->select_input()
									/*
									 *	'type' => T_('LABEL'),
									 *	
									 *	TYPE can be: integer | color | checkbox | checklist | html_input | password | text | radio | fileselect (The most common types)
									*/	
			
									'integer' => T_('Your Numeric'),
									'color' => T_('Your Color'),
									'text' => T_('Your Text'),
									// ect, ect...
									'input_group' => T_('Your Inline Group'),
			
									),
				'entries' => array(
			
			
			/*
			*	We only specified 4 types for this example, 
			*	3 types are inputs
			*	1 type is a group with inline groups
			*	depending on what was selected is what will be added
			*	when the user clicks the ADD button
			*	if the user selected multiple values, it will add multiple values on click action
			*	each new dynamically field will have a REMOVE button/link/action next to it
			*	thus fields can be removed independently
			*	each time the add button is clicked, it will add more fields
			*
			*	THESE ARE INDPENDENT INPUTS
			*/
											'_color' => array(
																'label' => T_('Set Set Item Color'),
																'defaultvalue' => '#fed136',
																'type' => 'color',
															),
			
											'_integer' => array(
																'label' => T_('Set Set Item Color'),
																'note' => '1-9',
																'valid_range' => array( 'min'=>1, 'max'=>9 ),
																'type' => 'integer',
															),
			
											'_text' => array(
																'label' => T_('Set Set Item Color'),
																'defaultvalue' => '#fed136',
																'type' => 'text',
																'allow_empty' => false,
															),
			
			
			
			/*
			*	
			*	each time the add button is clicked, it will add the inline group fields
			*	each new dynamically group will have a REMOVE button/link/action next to it
			*	thus if clicked will remove the group
			*
			*	THESE ARE GROUPED INLINE INPUTS
			*/	
			
			'_input_group' => array(
					'label' 		=> T_('Group'),
					'type' 			=> 'input_group',
					'inputs' 		=> array(
			
											'_color' => array(
																'label' => T_('Set Set Item Color'),
																'defaultvalue' => '#fed136',
																'type' => 'color',
															),
			
											'_integer' => array(
																'label' => T_('Set Set Item Color'),
																'note' => '1-9',
																'valid_range' => array( 'min'=>1, 'max'=>9 ),
																'type' => 'integer',
															),
			
											'_text' => array(
																'label' => T_('Set Set Item Color'),
																'defaultvalue' => '#fed136',
																'type' => 'text',
																'allow_empty' => false,
															),
						),
			
															
			
			))));
	}

This post has 2 feedbacks awaiting moderation...


Form is loading...

b2 – This forum is powered by b2evolution CMS, a complete engine for your website.