Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Important information for almost every question:
V1: Which Visforms version is running?
V2: Which Joomla version is running?
V3: Which PHP version is running?

Textare placeholder

More
8 years 5 months ago - 8 years 5 months ago #3117 by ttome
Textare placeholder was created by ttome
Hi!
What a problem to add placeholder attr to textarea?
Why the default layout doesn't have this function??

So, sometimes, i need this future, so i rewrite a bit this Perfect Extension!
All process in 3 steps!

1. Find the textarea.php here:
Code:
components/com_visforms/lib/html/field/textarea.php

and add this code somewere (for example on line 98)
Code:
if (!isset($attributeArray['placeholder']) || $attributeArray['placeholder'] == "") { $attributeArray['placeholder'] = "Test"; }

2. Now find this file:
Code:
administrator/components/com_visforms/models/forms/visfield.xml

And add this code (for example on line 476):
Code:
<field name="f_textarea_attribute_placeholder" type="text" label="COM_VISFORMS_PLACEHOLDER" description="COM_VISFORMS_PLACEHOLDER_DESC" class="inputbox" size="50" maxlength="" />

3. Save new constants
Code:
COM_VISFORMS_PLACEHOLDER
- label name

and
Code:
COM_VISFORMS_PLACEHOLDER_DESC
- label description

in file that placed here:
Code:
administrator/components/com_visforms/language/en-GB/en-GB.com_visforms.ini

NB
This future doesn't work with HTML-editor

That's all.
I think it will be usefull to add this attr to a default layout
Thank You and sorry for my bad english!
Last edit: 8 years 5 months ago by ttome.

More
8 years 5 months ago #3118 by Administrator AV
Replied by Administrator AV on topic Textare placeholder
Hi,

thanks for this post.

Have you tested, if the placeholder works as well as expected, when you enable the "HTML-Editor" Option in the field configuration?

Have you tested with different browsers as well, with and without textarea as editor?

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
8 years 5 months ago #3119 by ttome
Replied by ttome on topic Textare placeholder
Hi

No, it doesn't work with HTML-editor of course.
But it works great with simple textarea. In my forms i usually use it without editor.

It works in Safari (5+), Internet Explorer (10+), Google Chrome (10+), Firefox (4+) & Opera (11.50+).

More
8 years 5 months ago #3120 by Administrator AV
Replied by Administrator AV on topic Textare placeholder
Hi,

thanks for your tests and your reply once again!

In a component like Visforms, which is used by thousands of people and for very different forms, I have to provide functionality which always works as expected. So, if there is an option "placeholder" for the textarea, certainly some users would expect, that they can enable the placeholder and the html Editor option, both.

If I wanted to add your code to the Visforms core, I would have to write some more core, which would hide and clear the "placeholder" option properly, if the html-editor option is being enabled. I think, this is the reason, why I did not include a placeholder option for textareas in the first place. But maybe I can do this in a future release.

And of course everybody can use your code posted here. Thanks for making it available for everybody!

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
8 years 5 months ago #3158 by Administrator AV
Replied by Administrator AV on topic Textare placeholder
Hi,

this will be a feature of the next Visforms Release of the Beta-Version (3.8.3), which will probably be released in the next month.

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum