Please note that Form2Content is no longer being developed. All files from the latest version can be found on Github.

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. Futuron
  2. F2C submission form templating
  3. Tuesday, 20 October 2015
  4.  Subscribe via email
Hello,

We want to generate a link to an external script and send a couple of values (Joomla article ID and a value from a form field) from a specific article with it. (This script generates a XML file, used to import new articles, based on the main article)

In the article template it works fine and returns the values nicely.
<a href="/script.php?joomlaarticleid={$JOOMLA_ID}&value2={$FIELD2}" target="new">Generate articles</a>

Outputs:
<a href="/script.php?joomlaarticleid=613&value2=377" target="new">Generate articles</a>


However we want the link to the script to be only visible to the people who are able to add & edit articles, so we tried to use the same code in a custom form template. But instead of the values it generates the form elements (select, input) of those fields instead. Also the {$JOOMLA_ID} didn't return anything at all.

How can we get this working, so the script can be accessed from the submision form with all the desired values? Or do we need to use another method?


Regards,
Maurits

J 3.4.4.
F2C pro 6.10.0
Responses (4)
Accepted Answer Pending Moderation
Can't seem to edit the article and posting the code doesn't show as I thought it would. Well, you can see the code when you quote te post :p

Regards,
Maurits
Accepted Answer Pending Moderation
Hi Maurits,

It's not possible to use article template parameters in your form2content submission form. Logical since the output is the content of the forms you are filling out ...

The limitation should be processed within the Joomla article. For this you can use our (free) content restriction plugin. You cam limit the script access based on user group or even user ID.
http://extensions.joomla.org/extensions/extension/access-a-security/site-access/osd-content-restriction
http://documentation.form2content.com/f2c-extensions/joomla-content-restriction-plugin

Don't forget to read:
http://documentation.form2content.com/f2c-tips-and-tricks/f2c-plugin-examples/6-using-joomla-plugins-with-smarty

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
Accepted Answer Pending Moderation
Actually we would like to show the 'Generate articles' link only when the article has been created (so only on EDIT), by using something like {if $JOOMLA_ID}. So the values already exist.

We only need to fetch the raw (current) values so we can generate a url. The solution to put restrictions on the article might be usefull, but we would like to manage everything related to an article within 1 single form.


To clear thing up, this is the idea:
1. Customer creates an article and selects a value from a select box (filled from Database Lookup).
2. Customer goes to EDIT
3. Customer can now click 'Generate articles'
4. Articles are generated using the value from the select box (id from Database Lookup) and linked to the main article using the Joomla ID


Regards,
Maurits
Accepted Answer Pending Moderation
Hi Maurits,

I don't get the "generate articles" function. What does it do, what is the effect? What data goes where or is displayed where and how?

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.