Hide @ when empty e-mail field

More
6 years 7 months ago - 6 years 7 months ago #69424 by tbunte
We build a contact structur, where 95% of users have an e-Mail.
We set the value of e-mail-Field so, that it was linked (mailto-link).
But then we have in view of these field without content (5%) also the " @" sign - coming from system.

Is there a way to hide it?

best regards,
Thomas
Last edit: 6 years 7 months ago by ggppdk.

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

More
6 years 7 months ago #69444 by ggppdk
Hello

Do you mean that item form is submited with the email field having a field value:
@

Do
@
is saved in the Database as field value ?


-- 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...

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

More
6 years 7 months ago #69452 by tbunte
Hi,

the data cames from csv import.
When we stay these field empty it will not show in in Field list on detailpage (where it was needed to have the same order). So we place a " & nbsp;" as Standardvalue if field are empty.
But then was the @ always shown.

That's our problem. Maybe we find not the right configuration for it?

best regards,
Thomas

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

More
6 years 7 months ago #69455 by ggppdk
Hello

in import you do not need to add "&bsp;"

you can just leave it blank

so instead of
Code:
record_separator   record_separator
just use:
Code:
record_separator record_separator


-- 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...

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

More
6 years 7 months ago #69462 by tbunte
ok, but when there was no content in the field e-mail field , then the field label was not shown and the planned order of fields was destroyed. And if i place an value there, like "-", then happens directly the @ symbol.

See screenhot.

best regards,
Thomas
Attachments:

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

More
6 years 7 months ago #69464 by ggppdk
Hello

you have forgotten that you can use a custom layout

So if you would want the field to show
- then you do not need to add such values into the DB

1. Create a copy of the field's layout
plugins/flexicontent_fields/email/tmpl/value_default.php

as
plugins/flexicontent_fields/email/tmpl/value_mycustom1.php

and select it as layout
then comment out this:
Code:
// Skip empty value, adding an empty placeholder if field inside in field group /* if ( empty($value['addr']) ) { if ( $is_ingroup ) { $field->{$prop}[$n++] = ''; } continue; } */

and immediately after it add:
Code:
if ( empty($value['addr']) || $value['addr'] == '-' || $value['addr'] == ' ' ) { $field->{$prop}[$n] = $pretext . $html . $posttext; $n++; continue; // continue with next value }

you do not need to rely only on features of the field
you can do your own manipulation inside the layout


-- 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...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.289 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline