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.

How to display two (or more) fields in one row?

More
9 years 1 month ago #1456 by Plasa
I'd like to know, whether it's possible to display two or more fields in one row and how I could do this?

More
9 years 1 month ago #1457 by Administrator AV
Replied by Administrator AV on topic How to display two (or more) fields in one row?
Hi,

At the moment this is not possible but it will become a feature of one of the next releases of Visforms (for Joomla! 3). I don't know excatly when this will be yet.

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 1 week ago #1602 by frederic@brettcom.com
Replied by frederic@brettcom.com on topic How to display two (or more) fields in one row?
Hello,
Sorry to reply but i need quickly this feature. Have you an idea of the release date for this ?
Regards

More
9 years 1 week ago #1603 by Administrator AV
Replied by Administrator AV on topic How to display two (or more) fields in one row?
Hi Frederic,

this feature has already been released with Visforms 3.5.0.
Implementing this feature was one of the major changes for Visforms 3.5.0.
This is a beta Version (which I already use on my website).
Therefore I did enable the autoupdate message in Joomla! administration for this release, but you can download the release in the download section of this website. www.vi-solutions.de/fr/telechargements/j...omla-3-3-6-or-higher
Please read the documentation of this feature www.vi-solutions.de/fr/documentations/vi...e-plusieurs-colonnes that is important. (I'm really sorry that we have not been able to translate all those text into French yet)!

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 3 days ago #1621 by frederic@brettcom.com
Replied by frederic@brettcom.com on topic How to display two (or more) fields in one row?
Many thanks for your reply, great job, this feature is very helpfull.
I've the same request for the action button, can I have the button on the same line of the field.
You can see my problem at the end of this page : surycat.com/en/

More
9 years 3 days ago #1622 by Administrator AV
Replied by Administrator AV on topic How to display two (or more) fields in one row?
Hi Frederic,

what your are looking for is more like a very small inline form than a multi column form. Out of the box it is not possible to create an inline form with Visforms, but I think you could create a template override for this.

To achive this, is a bit difficult but maybe you are up to it. I assume you only want to display the one input and the submit button in your form.

1) Allow alternative layout in module (this is a feature which I should already have had implemented because it is Joomla! standard and which I have added to my changes for the next Visforms release, so that you will not loose these changes with the next update to Visforms 3.5.1 or higher).
Open the file modules/mod_visforms/mod_visforms.xml
Scroll to the end and find the
Code:
<fieldset name="advanced"> <field name="moduleclass_sfx" type="text" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" /> </fieldset>

Replace it with
Code:
<fieldset name="advanced"> <field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_LAYOUT_LABEL" /> <field name="moduleclass_sfx" type="text" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" /> </fieldset>

2) Create override files
Go to modules/mod_visforms/tmpl and copy all files from this folder
Go to templates/myTemplateName/html/mod_visforms
Most probably the folder will not jet exist, so you may have to create the html and/or mod_visforms folder in your template folder.
Paste the copied files in this folder.

3) Create alternative Layout files
Rename the copied files
default.php -> defaultinline.php
default_btdefault.php -> defaultinline_btdefault.php
and so on (so you change the leading "default" to "defaultinline").

4) Change the layout
I would use the default bootstrap layout as a basis for this override. So you have to make some changes to the defaultinline_btdefault.php file in the override folder in your template.
Find the code section
Code:
//then inputs, textareas, selects and fieldseparators for ($i=0;$i < $nbFields; $i++) { $field = $visforms->fields[$i]; if ($field->typefield != "hidden" && !isset($field->isButton)) { echo $field->controlHtml; } }
Replace it with
Code:
//then inputs, textareas, selects and fieldseparators echo '<div class="row-fluid">'; for ($i=0;$i < $nbFields; $i++) { $field = $visforms->fields[$i]; if ($field->typefield != "hidden" && !isset($field->isButton)) { echo '<div class="span6">'; echo $field->controlHtml; echo '</div>'; } }
Find
Code:
<div class="form-actions"> <?php //all button on the bottom of the form for ($i=0;$i < $nbFields; $i++) { $field = $visforms->fields[$i]; if (isset($field->isButton) && $field->isButton === true) { echo $field->controlHtml; } }

Replace it with
Code:
<div class="span6"> <?php //all button on the bottom of the form for ($i=0;$i < $nbFields; $i++) { $field = $visforms->fields[$i]; if (isset($field->isButton) && $field->isButton === true) { echo $field->controlHtml; } } //close row fluid echo "<div>";

Basically this will display the submit button in one line with the input field. But it's very much "hard coded" so that the layout will not work with more input fields. If you want to use two inputs and the submit button in one row change span6 to span4.

Kind Regars and good luck!
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