I've looked around and tried a few things on the test site, but I'm stuck on how to do this. basically I have a few forms that users fill out which creates standard articles in Joomla.
However, I don't know how to get this text
{youtube}FokKtuzIkM8{/youtube}
that the user puts in a textbox into the article that is created. I have to manually take that line (from the e-mail notification) and manually add it to the article before it is published.
what is the easiest way to have this inserted into the article right from the form??? I know the HTML source is the answer, but I'm a bit stuck.
:-)
Hi tokenring,
It probably needs some trial and error. Have you tried building it with entities {youtube} . . .?
Bob
I'll give that a whirl tonight again... I saw that mentioned, but I couldn't get it. Thanks for the reply!
I'm still stuck on this...😟
basically there is just one string of text that I want to get from the form into the article that I can't just figure out right now. I can get the autor-alias, fulltext, link... but I can't capture this string
[youtube]bla-bla-bla[/youtube]
what I have to do now is copy and paste this string from the e-mail notification I get into the article and then publish it. If this is easier than I am making it out to be, can someone shed some light???
Thanks guys!
Aaron
can someone show me the thread that details how to capture the text from ALL of the textboxes and to have it put into the article (automatically).
Thanks,
Aaron
How do we dump all of the form submissions (records from the linked table) into a table that shows up in a single/secure article.
Hi Trenchard,
You can do this with ChronoConnectivity to get a list to display in a site page.
To get the list into a Joomla article you'll need to write the PHP to extract the data from the database, format it and save it back to the jos_content table.
Bob
I think I've got a bit closer.
When you edit a form you and click on the "autogenerated code" tab you see the text of one of php files (config?) that generates the content of the article being submitted... I believe.
I know you can't save the box when you edit it (says it's pointless) however that file probably can be edited in the file system to do what you want. Is this right?
this part of the code made me think so.
$row =& JTable::getInstance("content", "Table");
srand((double)microtime()*10000);
$inum = "I" . substr(base64_encode(md5(rand())), 0, 16).md5(uniqid(mt_rand(), true));
JRequest::setVar( "recordtime", JRequest::getVar( "recordtime", date("Y-m-d")." - ".date("H:i:s"), "post", "string", "" ));
Aaron
also, there is a textbox for the user to enter embedded code, and it seems to not show up in the e-mails that are generated from the form. I suppose it is being executed somehow??
Aaron
Hi Aaron,
I think that Fredrik (nml375) posted a way to do this in the last week or two. I forget exactly what it was though.
Bob
are you replying the first or last comment i made?
Hi,
The code shown in the autogenerated section is not stored in any files on the site, but in the very same DB record that stores all the other information of your form. This code is re-generated every time you save your form, so I would not recommend trying to edit it in the database record.
Instead, you can use the "on submit - before email" input to run code prior the "autogenerated code", which in essence, allows you to create the needed data and store it as a form field value (using the JRequest::set() classmethod). Looking at the submitcontent demo-form should give you a few more hints as to setting the DB Connection up properly against the #__content table, and which fields to use.
/Fredrik
Thanks Fredrick. I'll look at that today. I'm sure it will take a bit because I don't want to mess it up. I'll do it on my test site first.
Is there another way this is done by default? When a user submits the form now the [description] textarea is entered into the article, however I don't see a line that details that in the onsubmit before/after???
Aaron
awesome. I knew that those lines put the article in the correct section, category and state but I didn't know you can control the content. Thanks for your help and it wasn't delayed at all ;-)
Aaron