How to add HTML tags in Field Value ?

More
7 years 1 month ago - 7 years 1 month ago #70598 by guillaume.mda
Hello all,

is there a way to add custom HTML tags (like <div>, <b>, <i>, etc.) to a default value on a Field?
Actually I tried to do it but doesn't work...

And I tried to do it with language string right in the value: the translation text is working but doesn't care about my HTML tags on the FrontEnd page...

Example: in Text Field Type, I add to the Default Value (Value Creation) :
Code:
<div><b><i>EXAMPLE_TEXT</i></b></div>
and add the translation text in the Language Overrides. On the FrontEnd page, the text of each language is display correctly but without the div, bold and italic tags...
I've tried to just put my language string (without HTML tags) in the Field Value and add the HTML tags directly in the Language Overrides but without any result too...

I have tried to add HTML tags on a "normal" Field default value (without language string), but it doesn't work too.
EDIT: with the Textarea Field Type, I succeed to display a Value with the HTML tags on the Front End, but the Language string doesn't work in this case...

Any idea how to do that?
Last edit: 7 years 1 month ago by guillaume.mda.

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

More
7 years 1 month ago #70599 by ggppdk
Hello

in text field,

enable validation that allows HTMl tags


-- 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
7 years 1 month ago - 7 years 1 month ago #70600 by guillaume.mda
Thanks for answer.

Yes, I already tried this :
on the "Server-Side validation" options: if I choose "Per user: Joomla Text Filter", the Field Value display the HTML tags I've added with the Value but don't care about the Language string (on the FrontEnd page, it displays the "brut" Language string, like "EXAMPLE_TEXT");
- if I choose the option "TEXT or Encoded HTML: allow entites, strip tags", it displays the translation text of the Language Overrides (like: "Example text"), but not the HTML tags (me, i would like: "Example text")... Strange...

So, it resolves only half of my problem... :huh:
Last edit: 7 years 1 month ago by guillaume.mda.

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

More
7 years 1 month ago - 7 years 1 month ago #70611 by ggppdk
Hello

for the text field
- the text parameter 'Default value' does not allow HTMLtags, as it uses default filtering

but if you use a language string in it,
then the item form should load and display the translation
(add it as both backend and frontend language string override)

and if you enable appropriate server-side validation
then you will be able to save it 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...
Last edit: 7 years 1 month ago by ggppdk.

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

More
7 years 1 month ago #70621 by guillaume.mda
Hi,

thank you.
Yes, it's what I've succeed to do.
Just pity that "default value" doesn't support HTML tags...

Is there a way to assign Fields to a specific language? Or I have to do it through a content plugin triggered by a Field?

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

More
7 years 1 month ago - 7 years 1 month ago #70622 by ggppdk

Just pity that "default value" doesn't support HTML tags...


it is trivial , we can just add
filter="raw" or similar to it , we already do it for other parameters because editing field configuration is privileged work anyway

Is there a way to assign Fields to a specific language ?


This is implementable, and it will be done sooner or later
Just there are several places to change, and on first try we will miss a couple of places


-- 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...
Last edit: 7 years 1 month ago by ggppdk.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.360 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