Hello,
I was long gone here in the forum and I have to once again incorporate.
Now, I want to create the entire contents of a form with "Joomla Article" into a Joomla-post, but it will not function.
Enclosed times a screen (screen-gr), where I have data inserted. However, I keep getting an error message after (screen4).
In Joomla backend, a new post is also created every time. But he is empty and the title and alias is absent from the post.
For testing I've done it so, as it is written in a forum post.
But actually I want the entire form content who (from all fields, including empty fields) in the Post. The contents of the article, I would like, if necessary formatting with CSS itself.
Can anyone help me to? That would be great. :-)
Thanks in advance.
Fredolino
I was long gone here in the forum and I have to once again incorporate.
Now, I want to create the entire contents of a form with "Joomla Article" into a Joomla-post, but it will not function.
Enclosed times a screen (screen-gr), where I have data inserted. However, I keep getting an error message after (screen4).
In Joomla backend, a new post is also created every time. But he is empty and the title and alias is absent from the post.
For testing I've done it so, as it is written in a forum post.
But actually I want the entire form content who (from all fields, including empty fields) in the Post. The contents of the article, I would like, if necessary formatting with CSS itself.
Can anyone help me to? That would be great. :-)
Thanks in advance.
Fredolino
Hi Fredolino,
Please copy and paste the Custom Code PHP here. It looks OK but it's hard to be sure from the image - and I think the error is coming from that code.
Note: To be tidy, the Custom Code should be after the Check Captcha action
Bob
Please copy and paste the Custom Code PHP here. It looks OK but it's hard to be sure from the image - and I think the error is coming from that code.
Note: To be tidy, the Custom Code should be after the Check Captcha action
Bob
:D ok,
the code:
The Costum Code of new position (screen)
F.
the code:
<? php
$ form -> data ['new_article'] = "<p> Ein Text hier </ p>
<p> Noch mehr Text {$ form-> data ['nachname']} mehr Text </ p>
< p> Noch mehr Text {$ form-> data ['vorname']} </ p>
";?>
The Costum Code of new position (screen)
F.
Hi Fredolino,
You have a lot of extra spaces :-(
Bob
You have a lot of extra spaces :-(
<?php
$form->data['new_article'] = "<p>Ein Text hier</p>
<p>Noch mehr Text {$form->data['nachname']} mehr Text</p>
<p>Noch mehr Text {$form->data['vorname']}</p>
";
?>
Bob
Hoppla,
I am perhaps a blind worm.
It works now.
What's missing is the title of the created Joomla dues.
How is automatically created with the code?
Fredolino
I am perhaps a blind worm.
It works now.
What's missing is the title of the created Joomla dues.
How is automatically created with the code?
Fredolino
Hi Fredolino,
What do you want as the Title?
Normally you would add a 'title' input to the form and then put title in the Title field box of the action.
Bob
What do you want as the Title?
Normally you would add a 'title' input to the form and then put title in the Title field box of the action.
Bob
Hi,
Yes, I have the box filled in Joomla Article-Action (screen1)
I thought that with it the title of the contribution will be created automatically (screen)
Best regards
F.
Yes, I have the box filled in Joomla Article-Action (screen1)
I thought that with it the title of the contribution will be created automatically (screen)
Best regards
F.
Hi Fredolino,
Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here.
Bob
Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here.
Bob
Hi Fredolino,
As you can see from the Debugger output there is no value set for [Bewerbung] so the Title is empty - do you need to make this required?
Bob
As you can see from the Debugger output there is no value set for [Bewerbung] so the Title is empty - do you need to make this required?
Bob
Hi,
just saw that my files do not appear in the article.
In the code I have in it:
"File Upload" is a PDF file.
"Photo" is a jpg file.
The parameters are in the form fields.
Can I show the picture in the Post? I think that I have to save the picture for it in a specific folder?
And it needs to be linked, too.
The PDF file is only to be linked in the post. But I do not know whether this will work automatically?
If this is the code that I have to insert in the Costum Code?
just saw that my files do not appear in the article.
In the code I have in it:
<p> CV {$ form-> data ['file upload']} </ p>
<p> Photo {$ form-> data ['photo']} </ p>
"File Upload" is a PDF file.
"Photo" is a jpg file.
The parameters are in the form fields.
Can I show the picture in the Post? I think that I have to save the picture for it in a specific folder?
And it needs to be linked, too.
The PDF file is only to be linked in the post. But I do not know whether this will work automatically?
If this is the code that I have to insert in the Costum Code?
<?php
if ( isset($form->data['foto']) && $form->data['foto'] ) {
echo "<img src='".JURI::root()."images/{$form->form_details->name}/{$form->data['foto']}' style='max-width:150px' />";
} else {
echo "<img src='".JURI::root()."images/{$form->form_details->name}/no_image.jpg' style='max-width:150px' />";
}
?>
<?php
if ( isset($form->data['dateiupload']) && $form->data['dateiupload'] ) {
echo "<a href='".JURI::root()."images/{$form->form_details->name}/{$form->data['dateiupload']} title="" />";
} else {
echo "Keine PDF vorhanden";
}
?>
Hi Fredolino,
There is a problem with extra spaces again in first the code you posted. I can't tell if the problems are in the code or the copying :-(
I don't see either file_upload or photo in the Debugger output you posted earlier so I'm not clear where that data is supposed to come from?
Bob
There is a problem with extra spaces again in first the code you posted. I can't tell if the problems are in the code or the copying :-(
I don't see either file_upload or photo in the Debugger output you posted earlier so I'm not clear where that data is supposed to come from?
Bob
Hi Bob,
I only known some of the form fields. After all text fields and the title work, I wanted to test the two file upload fields.
I have extended the code only to these two fields (file upload and photo).
F.
I only known some of the form fields. After all text fields and the title work, I wanted to test the two file upload fields.
I have extended the code only to these two fields (file upload and photo).
<?php
$form->data['new_article'] = "<p>Ein Text hier</p>
<p>Noch mehr Text {$form->data['vorname']} mehr Text</p>
<p>Noch mehr Text {$form->data['nachname']} mehr Text</p>
<p>Lebenslauf {$form->data['dateiupload']}</p>
<p>Foto{$form->data['foto']}</p>
";
?>
F.
Hi,
The table is empty again.
Can it also be that the 2 upload fields are multi fields?
I have in "Design" for the Fields setting example "[file upload]" and not, as in the other fields only: File Upload. But so it did not go well.
The table is empty again.
Can it also be that the 2 upload fields are multi fields?
I have in "Design" for the Fields setting example "[file upload]" and not, as in the other fields only: File Upload. But so it did not go well.
Data Array:
[submit6] => Submit
[Bewerbung] =>
[new_article] => <p>Ein Text hier</p>
<p>Noch mehr Text dudo mehr Text</p>
<p>Noch mehr Text dada mehr Text</p>
<p>Lebenslauf </p>
<div>Foto</div>
....
<tr><td>Sonstige Bemerkungen</td><td></td></tr>
<tr><td>Lebenslauf</td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td>1</td></tr>
<tr><td>Captcha</td><td></td></tr>
<tr><td></td><td></td></tr>
</table>
Hi :-)
i have just all Fields im Formular
Data Array:
Debugg Info
i have just all Fields im Formular
Data Array:
Array
(
[chronoform] => Bewerbung
[event] => submit
[titel] => Titel vom Beitrag2
[Anrede] => 0
[vorname] => vorname
[nachname] => nachname
[plz] => 47111
[ort] => ortschaft
[strasse] => strasse
[hausnr] => 111a
[telefon] => 03339700000
[mobil] => 071000000
[email] => info@mail.de
[geburtsdaten] => 11.11.1999
[geburtsort] => geburtsort
[nationalitaet] => nationalität
[arbeitserlaubnis] => 0
[familienstand] => famstand
[kinderanzahl] => 3kinder
[kinderalter] => alterkinder
[fuehrerschein] => 0
[fahrzeug] => 0
[status] => status
[kuendigungsfrist] => küfrist
[arbeitslos] => 11.11.2011
[verfuegbar] => 13.01.2017
[begruendung] => grund des wechsels
[schulabschluss] => schulabschluss
[ausbildung] => ausbildung
[studium] => studium
[akademgrad] => akademie
[weiterbildung] => weiterbildung
[berufserfahrung] => berufserfahrung
[fuehrungserfahrung] => führungserfahrung
[auslandserfahrung] => auslandserfahrung
[referenzen] => refernezen
[skills] => skills
[wunschposition] => wunschposition
[hirachieebene] => hirachie
[unternehmensgroesse] => untergröße
[letzesgehalt] => 3.000
[wunschgehalt] => 6.000
[arbeitszeit] => 0
[sonstiges] => sonstige bemerkungen
[zustimmung] => 1
[captcha] =>
[submit6] => Submit
[Bewerbung] =>
[new_article] => <p>Ein Text hier</p>
<p></p>
<p></p>
<p>vorname</p>
<p>nachname</p>
<p>47111</p>
<p>ortschaft</p>
<p>strasse</p>
<p>111a</p>
<p>03339700000</p>
<p>071000000</p>
<p>info@mail.de</p>
<p>11.11.1999</p>
<p>geburtsort</p>
<p>nationalität</p>
<p>0</p>
<p>famstand</p>
<p>3kinder</p>
<p>alterkinder</p>
<p>0</p>
<p>0</p>
<p>status</p>
<p>küfrist</p>
<p>11.11.2011</p>
<p>13.01.2017</p>
<p>grund des wechsels</p>
<p>schulabschluss</p>
<p>ausbildung</p>
<p>studium</p>
<p>akademie</p>
<p>weiterbildung</p>
<p>berufserfahrung</p>
<p>führungserfahrung</p>
<p>auslandserfahrung</p>
<p>refernezen</p>
<p>skills</p>
<p>wunschposition</p>
<p>hirachie</p>
<p>untergröße</p>
<p>3.000</p>
<p>6.000</p>
<p>0</p>
<p>sonstige bemerkungen</p>
<p></p>
<p></p>
<p>1</p>
</div>
[ip_address] => 7000000
)
Debugg Info
Array
(
[1] => Array
(
[Email] => Array
(
[0] => An email with the details below was sent successfully:
[1] => To:natt@mail.de
[2] => Subject:Lebenslauf eingegangen
[3] => From name:Admin
[4] => From email:admin@domain.com
[5] => CC:
[6] => BCC:
[7] => Reply name:
[8] => Reply email:
[9] => Attachments:
[10] => Array
(
)
[11] => Body:
<table>
<tr><td>Betreff</td><td>Titel vom Beitrag2</td></tr>
<tr><td>Anrede</td><td>0</td></tr>
<tr><td>Name</td><td>vorname</td></tr>
<tr><td></td><td>nachname</td></tr>
<tr><td>Adresse</td><td>47111</td></tr>
<tr><td></td><td>ortschaft</td></tr>
<tr><td></td><td>strasse</td></tr>
<tr><td></td><td>111a</td></tr>
<tr><td>Kontakt</td><td>03339700000</td></tr>
<tr><td></td><td>071000000</td></tr>
<tr><td>E-Mail</td><td>info@mail.de</td></tr>
<tr><td>Text Label</td><td>11.11.1999</td></tr>
<tr><td></td><td>geburtsort</td></tr>
<tr><td></td><td>nationalität</td></tr>
<tr><td>Für Ausländer: Gültige Arbeitserlaubnis?</td><td>0</td></tr>
<tr><td>Familie</td><td>famstand</td></tr>
<tr><td></td><td>3kinder</td></tr>
<tr><td></td><td>alterkinder</td></tr>
<tr><td>Mobilität</td><td>0</td></tr>
<tr><td></td><td>0</td></tr>
<tr><td>Beschäftigungsstatus</td><td>status</td></tr>
<tr><td></td><td>küfrist</td></tr>
<tr><td></td><td>11.11.2011</td></tr>
<tr><td></td><td>13.01.2017</td></tr>
<tr><td>Grund des Wechsels / Bemerkungen</td><td>grund des wechsels</td></tr>
<tr><td>Ausbildung</td><td>schulabschluss</td></tr>
<tr><td></td><td>ausbildung</td></tr>
<tr><td></td><td>studium</td></tr>
<tr><td></td><td>akademie</td></tr>
<tr><td>Weiterbildung</td><td>weiterbildung</td></tr>
<tr><td>Berufserfahrung in</td><td>berufserfahrung</td></tr>
<tr><td>Führungserfahrung</td><td>führungserfahrung</td></tr>
<tr><td>Auslanderfahrung</td><td>auslandserfahrung</td></tr>
<tr><td>Referenzen</td><td>refernezen</td></tr>
<tr><td>Skills</td><td>skills</td></tr>
<tr><td></td><td>wunschposition</td></tr>
<tr><td></td><td>hirachie</td></tr>
<tr><td></td><td>untergröße</td></tr>
<tr><td></td><td>3.000</td></tr>
<tr><td></td><td>6.000</td></tr>
<tr><td></td><td>0</td></tr>
<tr><td>Sonstige Bemerkungen</td><td>sonstige bemerkungen</td></tr>
<tr><td>Lebenslauf</td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td>1</td></tr>
<tr><td>Captcha</td><td></td></tr>
<tr><td></td><td></td></tr>
</table>
)
)
[3] => Array
(
[Email] => Array
(
[0] => An email with the details below was sent successfully:
[1] => To:info@fredo-design.de, info@mail.de
[2] => Subject:Vielen Dank für Ihre Online-Bewerbung
[3] => From name:Admin
[4] => From email:natt@mail.de
[5] => CC:
[6] => BCC:
[7] => Reply name:
[8] => Reply email:
[9] => Attachments:
[10] => Array
(
)
[11] => Body:
<table>
<tr><td>Betreff</td><td>Titel vom Beitrag2</td></tr>
<tr><td>Anrede</td><td>0</td></tr>
<tr><td>Name</td><td>vorname</td></tr>
<tr><td></td><td>nachname</td></tr>
<tr><td>Adresse</td><td>47111</td></tr>
<tr><td></td><td>ortschaft</td></tr>
<tr><td></td><td>strasse</td></tr>
<tr><td></td><td>111a</td></tr>
<tr><td>Kontakt</td><td>03339700000</td></tr>
<tr><td></td><td>071000000</td></tr>
<tr><td>E-Mail</td><td>info@mail.de</td></tr>
<tr><td>Text Label</td><td>11.11.1999</td></tr>
<tr><td></td><td>geburtsort</td></tr>
<tr><td></td><td>nationalität</td></tr>
<tr><td>Für Ausländer: Gültige Arbeitserlaubnis?</td><td>0</td></tr>
<tr><td>Familie</td><td>famstand</td></tr>
<tr><td></td><td>3kinder</td></tr>
<tr><td></td><td>alterkinder</td></tr>
<tr><td>Mobilität</td><td>0</td></tr>
<tr><td></td><td>0</td></tr>
<tr><td>Beschäftigungsstatus</td><td>status</td></tr>
<tr><td></td><td>küfrist</td></tr>
<tr><td></td><td>11.11.2011</td></tr>
<tr><td></td><td>13.01.2017</td></tr>
<tr><td>Grund des Wechsels / Bemerkungen</td><td>grund des wechsels</td></tr>
<tr><td>Ausbildung</td><td>schulabschluss</td></tr>
<tr><td></td><td>ausbildung</td></tr>
<tr><td></td><td>studium</td></tr>
<tr><td></td><td>akademie</td></tr>
<tr><td>Weiterbildung</td><td>weiterbildung</td></tr>
<tr><td>Berufserfahrung in</td><td>berufserfahrung</td></tr>
<tr><td>Führungserfahrung</td><td>führungserfahrung</td></tr>
<tr><td>Auslanderfahrung</td><td>auslandserfahrung</td></tr>
<tr><td>Referenzen</td><td>refernezen</td></tr>
<tr><td>Skills</td><td>skills</td></tr>
<tr><td></td><td>wunschposition</td></tr>
<tr><td></td><td>hirachie</td></tr>
<tr><td></td><td>untergröße</td></tr>
<tr><td></td><td>3.000</td></tr>
<tr><td></td><td>6.000</td></tr>
<tr><td></td><td>0</td></tr>
<tr><td>Sonstige Bemerkungen</td><td>sonstige bemerkungen</td></tr>
<tr><td>Lebenslauf</td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td>1</td></tr>
<tr><td>Captcha</td><td></td></tr>
<tr><td></td><td></td></tr>
</table>
)
)
)
Hi Fredolino,
Thank you. I do not see any sign of a Files Upload action there - or of any file input elements?
And I see that Bewerbung is still empty :-(
Bob
Thank you. I do not see any sign of a Files Upload action there - or of any file input elements?
And I see that Bewerbung is still empty :-(
Bob
Hi Bob,
Thank you for your patience.
I have now asked the drop-down boxes correctly (was previously only 1 or 0).
The checkbox is now available.
The form is called "Bewerbung".
I have a screen made from form design (screen) and a screen on the setting for "File Upload".
The same settings I have also at "Foto", except that the field name and ID are called "foto". The parameter is "accept = .jpg"
Thank you for your patience.
I have now asked the drop-down boxes correctly (was previously only 1 or 0).
The checkbox is now available.
The form is called "Bewerbung".
I have a screen made from form design (screen) and a screen on the setting for "File Upload".
The same settings I have also at "Foto", except that the field name and ID are called "foto". The parameter is "accept = .jpg"
But I think that I have the code for "File Upload" forgotten in the "Setup"?
And maybe I should so enter something or another "custom code".
And maybe I should so enter something or another "custom code".
if ( isset($form->data['foto']) && $form->data['foto'] ) {
echo "<img src='".JURI::root()."images/bewerbungen/{$form->form_details->name}/{$form->data['foto']}' style='max-width:150px' />";
} else {
echo "<img src='".JURI::root()."images/bewerbungen/{$form->form_details->name}/no_image.jpg' style='max-width:150px' />";
}
Hi fredolino,
Thank you, and is there a Files Upload action in the form ON Submit event with matching settings?
Bob
Thank you, and is there a Files Upload action in the form ON Submit event with matching settings?
Bob
I think we get the solution closer :-)
Enclosed my settings for the action
A test has me as a file-name written on the photo in the Joomla-Post:
20151216161804_avatar_flash.jpg. But the photo is not displayed.
When PDF hands me a link to click in the article.
Enclosed my settings for the action
A test has me as a file-name written on the photo in the Joomla-Post:
20151216161804_avatar_flash.jpg. But the photo is not displayed.
When PDF hands me a link to click in the article.
Hi,
I have to ask again, how do I link to a PDF file and can view the image file in the post.
In addition I would this code change form:
in this
PDF:
Foto:
I have to ask again, how do I link to a PDF file and can view the image file in the post.
In addition I would this code change form:
<p>{$form->data['dateiupload']}</p>
<p>{$form->data['foto']}</p>
in this
PDF:
<?php echo "<a href='{$form->files['input_name']['link']}' >{$form->files['input_name']['dateiupload']}</a>"; ?>
Foto:
<?php echo "<img src='{$form->files['input_name']['link']}' />"; ?>
This topic is locked and no more replies can be posted.