[SOLVED] Unnecessary wrapping DIV element in group fields

3 years 1 month ago - 3 years 1 day ago #56110 by agata
Hello,
I did a test upgrade to the latest flexi version and I noticed a carousel of image and text fields isn't working correctly (it's a multi-value group field). I noticed there's a wrapping element in there that's being added by Flexi and that is <div class="fc-fieldgrp-value-box">. Would it be possible to not force this element in there in the future version? If someone needs a wrapping element then they can always use the prefix/suffix fields within the group field's configuration.
Thanks,
Agata

Please Log in or Create an account to join the conversation.

3 years 1 month ago #56111 by ggppdk
Hello

it is default value,

add anything inside:
prefix or suffix parameters
e.g. inside prefix parameter add:
<div style="display:none"></div>


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

3 years 1 month ago #56113 by agata
Hello,
Thanks, I already figured this out by looking into the source code of the plugin and solved it by adding a space to the prefix. I still think this isn't an intuitive solution and that the div shouldn't be there by default, the rendered code should be as clean as possible in my opinion.
Cheers,
Agata

Please Log in or Create an account to join the conversation.

3 years 1 month ago #56114 by ggppdk
Hello

it is for user being less capable with HTML,

the negative is that this default is applied in the case of using display via custom HTML parameter

not sure how to change this without breaking display of the field, maybe we should remove this default if using custom HTML parameter,
that should be a good compromise


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

3 years 1 month ago #56115 by agata
Yes, that would be an excellent solution. If someone is using the custom html then it means they're particular about what code structure they want to achieve and then that additional div might make it difficult on them.
Thanks as ever,
Agata

Please Log in or Create an account to join the conversation.

3 years 1 month ago #56117 by ggppdk
Hello

Yes, that would be an excellent solution. If someone is using the custom html then it means they're particular about what code structure they want to achieve and then that additional div might make it difficult on them.


will commit this change, not adding it, if custom HTML parameter is used


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

3 years 1 day ago #57271 by agata
Hello,
Unfortunately the problem seems to be back now, when using custom code I get the elements wrapped in <span " ></span> which totally scrambles a layout on one of the sites I manage. The code is not correct and shouldn't be there at all when using custom code with the group field. I looked into the code of the field plugin and found the following
if (!$pretext && !$posttext && !$display_mode)
		{
			$pretext = '<div class="fc-fieldgrp-value-box">';
			$posttext = '</div>';
		}
		$pretext  = '<span '.$fieldgroup_itemtype_code.'" >'.$pretext;
		$posttext = $posttext.'</span>';
which looks like it's responsible for that glitch, however if I change it, it doesn't fix it. But I can't see anything else that could be causing it. I will continue investigating but would be great if you could look into it as well.
Thanks,
Agata

Please Log in or Create an account to join the conversation.

3 years 1 day ago #57272 by ggppdk
Hello

yes but it should be ok, with v3.0.9-dev2

github.com/FLEXIcontent/flexicontent-cck/releases

please confirm


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

3 years 1 day ago #57274 by agata
Hello,
Thank you for such a quick reply, yes it seems to work better.
Best,
Agata

Please Log in or Create an account to join the conversation.

3 years 1 day ago #57275 by ggppdk
Hello

an important change in v3.0.9-dev is proper handling of numbers/currency/percentages in field
text/number/custom validation

please read changelog for the above

and provide some feedback too


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.