Re - Description of custom field

Visto 17 veces
Saltar al primer mensaje no leído

Dharmesh Patel

no leída,
28 jun 2022, 17:41:0228/6/22
a Joomla! General Development
Hi All,

I trying to find a way to add HTML in description section of a custom field but it seems to remove all HTML.

Any I have looked in the model where the data is saved but all html gets removed before it reaches the Save method in com_field component.

Thanks for help.



This email is intended only for the person to whom it is addressed. If you are not the intended recipient, please notify the sender by replying to this email and delete this email, do not use, disclose, copy, print or rely on the email in any manner. To the extent permitted by law, Just The Answer Limited does not accept or assume any liability, responsibility or duty of care for any use of or reliance on this email by anyone, other than the intended recipient to the extent agreed in the relevant contract for the matter to which this email relates (if any). Just The Answer Limited may monitor outgoing and incoming emails and other telecommunications on its email and telecommunications systems. By replying to this email you give your consent to such monitoring. This email has been scanned for viruses but Just The Answer Limited does not accept or assume any liability or responsibility for any loss or damage caused by viruses, it is the recipients responsibility to scan all incoming emails and other electronic communications for viruses and other threats.

Just The Answer Limited is registered in England and Wales with the company number 4909478
VAT Number: 823430066

Dhirendra

no leída,
28 jun 2022, 23:53:2528/6/22
a joomla-de...@googlegroups.com,dhar...@cyphermedia.co.uk
use below code 

JRequest::getVar("your_input_name", '', 'post', 'string', JREQUEST_ALLOWHTML );

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/joomla-dev-general/68074b0d-2795-4f10-95dc-4544a3580374n%40googlegroups.com.


--
With Regards
Dhirendra Singh
8287769888

Dharmesh Patel

no leída,
29 jun 2022, 2:03:5529/6/22
a Dhirendra,joomla-de...@googlegroups.com
Thanks Dhirendra. Can’t find out where I mean which file I need to make this change.

Thanks.
--
Kind regards,

Dharmesh Patel
Developer

————————
CYPHER MEDIA
Tel: 01905 827772
Mob: 07904 501896
4 De Salis Court
Droitwitch Spa
Worcestershire WR9 0QE
www.cyphermedia.co.uk

(sent from my mobile)

Dhirendra

no leída,
29 jun 2022, 2:09:0029/6/22
a Dharmesh Patel,joomla-de...@googlegroups.com
Just before you are saving the form data or modifying the data.

also when you are using XML form structure you can use the 'editor' form field type. In that case for allowing HTML tags, you have to use the attribute "filter='safehtml'" to allow saving the content with HTML tags.

eg:

<field
                name="event_desc"
                type="editor"
                editor="tinymce"
                width="400"
                height="100"
                label="COM_YOURCOMPONENT_FIELD_LABEL"
                description="COM_YOURCOMPONENT_FIELD_DESC"
                cols="30"
                rows="5"
                class=""
                default=""
                filter="safehtml"
                />

Dharmesh Patel

no leída,
29 jun 2022, 2:22:1629/6/22
a Dhirendra,joomla-de...@googlegroups.com
Thanks for looking into this for me. I have override the XML file and set the filter to safeHtml using system plugin. Only issue I am having is I can’t find where the html tags are been removed. Usually it should be in the Model class the Store() method but it doesn’t seems to be there.  Can’t find anything in controller either.

Thanks for your help. Appreciated.
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos