Please read and follow the COMMON ISSUES first!
Always add your version information in every new post! Thank you!

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. Hans de Jong
  2. Form2Content Lite & Pro
  3. Wednesday, 19 December 2018
  4.  Subscribe via email
F2c 6.16.0 (hope to upgrade soon).

Users of my website fill in data in a f2c content type 'public profile'. I like to use some of that data in another content type 'interview', so the users don't have to fill in the same data twice, with a chance of differences, and I can combine the data in template of the interview article. A user can only have one public profile, of course.

How can I manage this? I see two possibilties - using just one content type and hiding the interview questions for users not belonging to a specific category - or using database lookup fields in the interview content type to extract data from the public profile, and hide those on the submission form.

Or is there an easier way to use to the data of another article by the same user in the article template?

What is possible and what would you advice?
Responses (3)
Accepted Answer Pending Moderation
Hi Hans,

Apologies for the late reply, holidays interfered a bit and your reply skipped my attention.

You will always have to select the Profile somehow otherwise there is no relation. This is done using the database lookup field. You can select the article or create a custom query. The DB lookup field stores an title/ID. I guess the logic for you is to store the Title and a Male/Female value which you check with your query.

Query would be something like (sorry, don't know sql): For the selected article check the value of field X and if male store 1 else 2.

The second step is to add logic in your template. {if $DBFIELDTITLE_VALUE =='1'}He{else}She{/if}

Hope this helps!

Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 1
Accepted Answer Pending Moderation
Thanks Patrick,

I studied all the documentation, and if I understand correctly, the plugins are dedicated to displaying content from different articles together. What I need however is best illustrated by an example:

Based on the gender, given in article A, I want to use 'He' or 'She' in article B, without having to ask the author to enter the gender again.

Am I right the plugins are not able to do this?

I did find out, that without using the plugins, I can use the content of fields in article A by using a single database lookup field with a query like this one for each field (query not optimized and with example values):

SELECT 1, c. content FROM jos5d_f2c_form AS f, jos5d_f2c_fieldcontent AS c
WHERE f.created_by = {$CURRENT_USER_ID}
AND = c.formid
AND c.projectid = 2
AND c.attribute = "VALUE"
AND c.fieldid = 15;

When I show the content in the frontend submission form it is shown as a dropdown list with one entry. Of course this field can be hidden in the submission form at the frontend.

I haven't experimented with the submission form templating yet. Would be nice if I could do the same trick (He or She) in making up the caption of the fields. Now I have to do something like "Does he/she have a ...."
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 2
Accepted Answer Pending Moderation
Hi Hans,

Yes that's possible using the F2C Anywhere plugin:

Please read the extensive documentation by Pieter-Jan. Tip, your link is in the author ID.

There are also other plugins like Related Authors which can be used.

Please read the documentation to get to grips with the possibilities.

Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 3
  • Page :
  • 1

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