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.

Formular ID

More
8 years 8 months ago #1966 by Administrator AV
Replied by Administrator AV on topic Formular ID
Verwendest du das Formular in einem Modul?

: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 8 months ago #1967 by Administrator AV
Replied by Administrator AV on topic Formular ID
Ach, das Feld hat natürlich schon die Info über das Formular zu dem es gehört.
Code:
$fid = $field->fid

Gruß,
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 8 months ago #1981 by OrangeCocoon
Replied by OrangeCocoon on topic Formular ID
Hallo Aicha,
ich verwende das Formular in einem Beitrag!

;-)
Ich habe in die select.php
Code:
$fid = $field->fid $formid = JFactory::getApplication()->input->get('fid', 0 , 'int');

eingefügt . dies führt wieder zu einer leeren Seite - nehme ich den
Code:
$fid = $field->fid
raus - wird er wieder angezeigt....

Fällt Dir noch etwas ein? Müssen wir ggf. wegen des einbinden in den Beitrag ggf. sagan, das die ID aus der Componente geholt wird?

More
8 years 8 months ago #1982 by Administrator AV
Replied by Administrator AV on topic Formular ID
Hallo,

ich vermute die leere Seite kommt, weil du den Code fehlerhaft ist aber die Anzeige von Fehlern unterdrückt wird.

hinter das $fid = $field->fid
gehört eine Semicolon. Also
$fid = $field->fid;
Das $formid aus dem request brauchst du nicht.
Den Aufruf des $fid musst du machen, nachdem das $field bereits definiert wurde also unterhalb des $field =....

Gruß,
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 8 months ago - 8 years 8 months ago #1984 by OrangeCocoon
Replied by OrangeCocoon on topic Formular ID
Hallo Aicha,
okay - nun spuckt er aber den SprachCode "CHOOSE_A_VALUE0" aus... es müsste eigentlich 1 sein!?

Lasse ich das $formid weg - greift er STandard auf die SPrachdatei zurück - das will ich auch nicht hier mal der derzeitige komplette Code:
com_copmpnents/lib/html/control/default/select.php
Code:
/** * Method to create the html string for control * @return string html */ public function getControlHtml () { $field = $this->field->getField(); $fid = $field->fid; $html = ''; $k=count($field->opts); $options = array(); $checked = array(); //Has select no default value? Then we need a supplementary 'default' option for selects that are not "multiple" or have a height < 1. Otherwise the first option can not be selected properly. if (((!(isset($field->attribute_multiple)) || ($field->attribute_multiple != 'multiple' && $field->attribute_multiple != '1' && $field->attribute_multiple != true)) && (!isset($field->attribute_size) || ($field->attribute_size == '' || $field->attribute_size <= 1)) && (!(isset($field->list_hidden))|| strpos($field->list_hidden,'listitemischecked') == false))) { $formid = JFactory::getApplication()->input->get('fid', 0 , 'int'); $options[] = JHTML::_('select.option', '', JText::_('CHOOSE_A_VALUE'.$formid)); } for ($j=0;$j < $k; $j++) { if ($field->opts[$j]['selected'] != false) { $checked[] = $field->opts[$j]['value']; } $options[] = JHTML::_('select.option', $field->opts[$j]['value'], $field->opts[$j]['label']); } $html .= JHTML::_('select.genericlist', $options, $field->name . '[]', array('id'=>'field' . $field->id,'list.attr'=>$field->attributeArray, 'list.select'=>$checked)); return $html; } /**
Last edit: 8 years 8 months ago by OrangeCocoon.

More
8 years 8 months ago #1985 by Administrator AV
Replied by Administrator AV on topic Formular ID
Hallo,

aufgrund deiner ursprünglichen Frage und wie du sie gestellt hast, bin ich eigentlch davon ausgegangen, dass du dich mit php und Programmierung auskennst und einfach nur wissen wolltest, wie du an der Stelle an der du bist die Formularid als Variable abgreifen kannst und habe versucht dir diese Info zu geben.

Im ersten Ansatz hatte ich die Variable als Beipsiel $formid genannt. Später habe ich sie dann $fid genannt, vielleicht etwas unaufmerksam, aber ich habe nicht alle Forumspost ständig im Kopf und wollte dir wie gesagt nur examplarisch die Info geben. Dass du den alten Code dann wegmachen musst und natürlich dann auch nicht mehr mit $formid arbeiten kannst sondern die Variable dann $fid heißt versteht sich eigentlich von selbst.

Also du hast in deinem Code immer noch drinstehen
Code:
$formid = JFactory::getApplication()->input->get('fid', 0 , 'int');
Das muss raus
und etwas weiter unten muss es dann natürlich nicht
Code:
$options[] = JHTML::_('select.option', '', JText::_('CHOOSE_A_VALUE'.$formid));
heißen sondern
Code:
$options[] = JHTML::_('select.option', '', JText::_('CHOOSE_A_VALUE'.$fid));

Gruß,
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 :-).
The following user(s) said Thank You: OrangeCocoon

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum