71 Posts
Dgikar
5 years ago
12
Topic

Hello all!

The question of how and what to register in markup.php ...

For example, I have a Radio (stylized Button), consisting of 3 buttons (although this is not the point, since these buttons can be both 2nd and 15th ...). The inscriptions on these buttons are long. If you watch the whole thing on the monitor and / or tablet (and even then not at all), then everything is OK! Displays everything as it should. But it is necessary to launch the site on the phone, as the buttons are knocked together and it turns out like this:

The code itself (in the browser) looks like this:

<fieldset id="user_have_no_exp_work" class="radios">
	<input type="radio" id="user_have_no_exp_work0" name="user_have_no_exp_work" value="1" class="radio" size="1">
	<label for="user_have_no_exp_work0">у меня нет опыта работы</label>
	<input type="radio" id="user_have_no_exp_work1" name="user_have_no_exp_work" value="2" class="radio" size="1">
	<label for="user_have_no_exp_work1">у меня есть опыт работы</label>
	<input type="radio" id="user_have_no_exp_work2" name="user_have_no_exp_work" value="3" class="radio" size="1">
	<label for="user_have_no_exp_work2">расскажу на собеседовании</label>
</fieldset>

I want to add divs with UIKIT classes to this code and each input and label from the above fieldset id = "user_have_no_exp_work" wrap the markup into UIKIT ... Ie, to make it like this:

<fieldset id="user_have_no_exp_work" class="radios">
	<div class="uk-grid-small uk-child-width-expand@s uk-text-center" uk-grid>
		<div>
			<input type="radio" id="user_have_no_exp_work0" name="user_have_no_exp_work" value="1" class="radio" size="1">
			<label for="user_have_no_exp_work0">у меня нет опыта работы</label>
		</div>
		<div>
			<input type="radio" id="user_have_no_exp_work1" name="user_have_no_exp_work" value="2" class="radio" size="1">
			<label for="user_have_no_exp_work1">у меня есть опыт работы</label>
		</div>
		<div>
			<input type="radio" id="user_have_no_exp_work2" name="user_have_no_exp_work" value="3" class="radio" size="1">
			<label for="user_have_no_exp_work2">расскажу на собеседовании</label>
		</div>
	</div>
</fieldset>

well or ideally like this:

<fieldset id="user_have_no_exp_work" class="radios">
	<div class="uk-grid-small uk-child-width-expand@s uk-text-center" uk-grid>
		<div>
			<label><input type="radio" id="user_have_no_exp_work0" name="user_have_no_exp_work" value="1" class="uk-radio" size="1">у меня нет опыта работы</label>
		</div>
		<div>
			<label><input type="radio" id="user_have_no_exp_work1" name="user_have_no_exp_work" value="2" class="uk-radio" size="1">у меня есть опыт работы</label>
		</div>
		<div>
			<label><input type="radio" id="user_have_no_exp_work2" name="user_have_no_exp_work" value="3" class="uk-radio" size="1">расскажу на собеседовании</label>
		</div>
	</div>
</fieldset>

That is, so that the input was wrapped in a <label> and at the same time was in a separate cell of the grid (grid) ...


Honestly ... I have been tormenting this case for several months ... But I couldn’t (correctly) register anything in markup.php ...


There is also a checkbox, which has a lot of choices. All these "buttons" are arranged in one line and, when necessary, are transferred to the second line ...

The code (in the browser) looks like this:

<fieldset id="user_work_places_0_exp_work_out_reasons" class="checkboxes vertical">
	<div class="cck-fl">
		<input type="checkbox" id="user_work_places_0_exp_work_out_reasons0" name="user_work_places[0][exp_work_out_reasons][]" value="1" class="checkbox" size="1">
		<label for="user_work_places_0_exp_work_out_reasons0">checkbox1</label>
		<input type="checkbox" id="user_work_places_0_exp_work_out_reasons2" name="user_work_places[0][exp_work_out_reasons][]" value="3" class="checkbox" size="1">
		<label for="user_work_places_0_exp_work_out_reasons2">checkbox2</label>
		<input type="checkbox" id="user_work_places_0_exp_work_out_reasons4" name="user_work_places[0][exp_work_out_reasons][]" value="5" class="checkbox" size="1">
		<label for="user_work_places_0_exp_work_out_reasons4">checkbox3</label>
		<input type="checkbox" id="user_work_places_0_exp_work_out_reasons5" name="user_work_places[0][exp_work_out_reasons][]" value="6" class="checkbox" size="1">
		<label for="user_work_places_0_exp_work_out_reasons5">checkbox4</label>
		<input type="checkbox" id="user_work_places_0_exp_work_out_reasons6" name="user_work_places[0][exp_work_out_reasons][]" value="7" class="checkbox" size="1">
		<label for="user_work_places_0_exp_work_out_reasons6">checkbox5</label>
		<input type="checkbox" id="user_work_places_0_exp_work_out_reasons7" name="user_work_places[0][exp_work_out_reasons][]" value="8" class="checkbox" size="1">
		<label for="user_work_places_0_exp_work_out_reasons7">checkbox6</label>
	</div>
</fieldset>

Here is the same situation (Wishlist) as with Radio (so that the input was wrapped in a <label> and at the same time was in a separate cell of the grid (grid) ...) + to everything, so that each "button" would be located in a column ( i.e. one "button" - one line) ...

Such an arrangement (in a column), I need ONLY in this checkbox, and not in the whole project ...

Please help code!


Thank you in advance for the answers!

Get a Book for SEBLOD
1283 Posts
Bucklash
5 years ago
4
Level 1

One option is to duplicate the plugin, rename it... and add desired markup that way....

After this:

$form  =  ‘<fieldset id=“‘.$id.’” ‘.$attr.’>’.$form.’</fieldset>’; 

71 Posts
Dgikar
5 years ago
3
Level 2

Bucklash:

... duplicate the plugin ...

Which way should I put the duplicate plugin?

Well ... Your idea has the right to life, but when updating the plug-in, I may lose the new feature (if it will) ... It seems to me that the most correct decision is through markup.php ...

1283 Posts
Bucklash
5 years ago
2
Level 3

Maybe, I don’t know but it seems markup overrides stuff around the output, but you want to actually override the core output of field....

71 Posts
Dgikar
5 years ago
1
Level 4

Ok, I'll try! But where should I duplicate this plugin? Which way to put the file / files? And what exactly do I need to duplicate?

1283 Posts
Bucklash
5 years ago
0
Level 5

Download the plugin... (can do that in the “Advanced” Tab in Extensions -> plugins ...

Then rename to reflect your plugin’s new name:

- Language files (and content within)

- checkbox.php (rename the php class and type as well)

- checkbox.xml (and content within)

Might be trial and error at first but you’ll get it :D

5 years ago
4
Level 1

Hello, 

What you are looking for is an HTML plug-in equipped with the entire uikit framework. We developed 6 years ago now a plug-in for the warp framework, we should do the same for uikit3, but lack of time.

The plugin was able to do this with Warp Yootheme, it still works but it should be adapted to uikit 2/3:

5 years ago
3
Level 2

If developers are ready to develop this plugin colaboration from an existing database and adpater to Uikit or other framework, thank you to manifest here and we'll see how to get there.

548 Posts
joomleb
5 years ago
2
Level 3

Hi Alex, 

Please, Is this anything we can think also for Helix Ultimate template framework and SP Page Builder ?

Could you Please, give us all the detailed informations, instructions, needed to develop that plugin ?

5 years ago
1
Level 4

Hi joomleb,

Of course, we can do that for any framework like Helix ultimate.

To give more details, we need a development framework, and a manager by framework. To start the development, you need a developer that can attack PHP, JS, HTML and CSS. I do not have time to do this work, I can accompany but not do.

548 Posts
joomleb
5 years ago
0
Level 5

Hi Alex, 

many thanks! Before to going further we asked it to:

Helix Ultimate forum

SP Page Builder forum - I asked also about a SEBLOD integration like for Joomla Articles and K2

143 Posts
Stef
4 years ago
1
Level 1

Halo Alex;

Est-ce que c'est toujours d'actualité ? Je travaille beaucoup (en fait exclusivement) avec UIKIT3. Je pourrais peut-être me pencher sur le problème ? Je ne suis pas un expert en JS mais si on me donne quelques clés, j'arrive la plus part du temps à me débrouiller :-) Je pourrais peut-être au moins essayer ?

4 years ago
0
Level 2

Bonjour,

Nous utilisons Uikit 3 sur notre dernier projet pour la partie JS uniquement. Nous n'utilisons plus de champs Div, nous avons mieux. Je suis navré mais ce n'est plus d'actualité.

Cordialement.

Get a Book for SEBLOD