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?

Position radiobutton and time

More
10 years 4 months ago #698 by Administrator AV
Replied by Administrator AV on topic Position radiobutton and time
Hi Arne,

the second mail arrived an when I saw it noticed, that the first one had arrive to, but I had overlooked it. (There were quite a lot of new mails with similar subject and I must have set it to "read" although I had read it.)

About the radio buttons. Your template includes a css file called bootstrap.css which is located in the templates/yourTemplateName/cssCompiled folder. This bootstrap.css has a rule
Code:
label { display: block; margin-bottom: 5px; }
starting at the first line of the bootstrap.css file.
The "display: block;" is what makes the labels move into an new "line".
You could change this to "display: inline;" and the radio button will be displayed properly.
If you want to be more specific and change the rule just for the radio button field in the form and not all labels you could add a "css class for field" in the radio button layout options, i.e. labelinline
After that add the following css either in the visforms.css file (media/com_visforms/css) or in any of your template css files.
Code:
p.labelinline label { display: inline; }

About the date:
You could call this a bug, that appears, when you use a date field that is set to readonly. I have to figure how to fix that. And will post the solution, as soon as I have one.

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
10 years 4 months ago #699 by KompanHarder
Replied by KompanHarder on topic Position radiobutton and time
Hi Aicha,

many thanks for your detailed explanation. Just to give detailed feedback. I went for the second solution and thant's what I did:

I copied your css block in the css file I directly opened from your visforms component (Edit CSS).
I entered "labelinline" in the "css class for field" in the radio button layout option.

And it worked perfect :)

Where do I find your postings once the date bug is solved? ;)

More
10 years 4 months ago #700 by Administrator AV
Replied by Administrator AV on topic Position radiobutton and time
Hi Arne,

I'll post it here.

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
10 years 4 months ago #705 by Administrator AV
Replied by Administrator AV on topic Position radiobutton and time
Hi Arne,

finally I had the time to look into the date format problem. As it turned out it is a shortcoming of a Joomla! core function which should be used by developers to create date controls. If you have a readonly date field, this functions always returns the format Y-m-d H:i:s which is exactly what you see.

Here is the solution which will be part of the next Visforms release and which you can integrate into the code of your Visforms installation right now if you want.

Open the file administrator/components/com_visforms/helpers/html/visforms.php

Find the following code (line 663)
Code:
public static function getDateControl($field) { $date = JHTML::calendar($field->attribute_value, $field->name, 'field' . $field->id, $field->dateFormatJs, $field->attributeArray); return $date; }

Replace it with
Code:
public static function getDateControl($field) { //Joomla date control for readonly fields has a fixed date format with time, we cannot use it in this case if(isset($field->attributeArray['readonly']) && ($field->attributeArray['readonly'] == "readonly" || $field->attributeArray['readonly'] == 1 || $field->attributeArray['readonly'] === true)) { if (is_array($field->attributeArray)) { $attribs = JArrayHelper::toString($field->attributeArray); $value = $field->attribute_value; $name = $field->name; $id = $field->id; } $date = '<input type="text" title="' . (0 !== (int) $value ? JHtml::_('date', $value, null, null) : '') . '" value="' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '" ' . $attribs . ' />' . '<input type="hidden" name="' . $name . '" id="' . $id . '" value="' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '" />'; } else { $date = JHTML::calendar($field->attribute_value, $field->name, 'field' . $field->id, $field->dateFormatJs, $field->attributeArray); } return $date; }

I tested thoroughly but maybe you want to make a backup copy of the file first, just in case.

As Joomla! 3 has totally refactored the code of the core function, the date format of readonly date fields is correct in Visforms for Joomla! 3 without making changes.

Kind 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
9 years 11 months ago #1080 by KompanHarder
Replied by KompanHarder on topic Position radiobutton and time
Hi Aicha,

I am going to test the code next week to get the date format fixed but one other question came to my mind today: in the menü setting for the visform data I am "only" able to set the "Data sort by"-field but not in which direction: ascending or descending. Is there any chance to get this done?

Many thanks again
Arne

More
9 years 11 months ago #1085 by Administrator AV
Replied by Administrator AV on topic Position radiobutton and time
Hi Arne,

I was out of office on Friday and Saturday and on Sunday I just decided not to work.
I'm sorry, but to implement the sort order for site data view is a bit more complicated and I cannot just write down the code here.
I think I will implement it and post the code then, but this could take it's time.

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