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. Didier Pollez
  2. F2C submission form templating
  3. Monday, 25 November 2019
  4.  Subscribe via email
Hi F2C
Is there an easy way to limit the selectable values of a Joomla native field, e.g. Access, to a predefined list?
Thanks
Didier.
Responses (10)
Accepted Answer Pending Moderation
Hi Didier,

Please add version info.

If I understand you correctly I don't think so. Basically if you can do it in the Joomla article manager it should also happen in the F2C article manager.

It is possible in Pro to have default settings for many of the Joomla fields and hide them from the form.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
Accepted Answer Pending Moderation
Thanks,
I use Pro and the hidden default settings and am very satisfied with it.
But I want editors to be able to select a different access level than the default one, but I don’t want to give them the complete list of access levels as that can result in articles they cant’s see.
I can of course create categories for each access level but that would be to confusing and cumbersome.
I thought maybe it was possible to create a single select list with the necessary values and then copy that value to the articles Joomla native Access field, but I don’t see how to achieve this.
Didier.
Accepted Answer Pending Moderation
Hi Didier,

I am confused, first you talk about native Joomla fields and now you are talking about article access??

Do you want some front-end users to see moer than just their own articles but not all articles?
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
Accepted Answer Pending Moderation
Well, Access is a native Joomla field (definition from your documentation) who contains all the defined Access Levels. I want a user to be able to choose only a few of them. Hope this is clear?
Accepted Answer Pending Moderation
OK, I understand. I'm afraid that F2C just loads the field and the content comes from Joomla. I know it's possible to write a F2C plugin that could be triggered on page load. I don't know if that could be used to "catch and alter" the access field values. A programmer with Joomla understanding would need to look into that. I will ask Julien if he has any ideas.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
Accepted Answer Pending Moderation
The ideal would be to be able to filter all native Joomla content fields by excluding certain (groups of) values from the selection.
Dreams make life bearable ?
Didier.
Accepted Answer Pending Moderation
Hi Didier,

I'm afraid F2C is not build to facilitate that and it will have to remain a dream, sorry :(

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
Accepted Answer Pending Moderation
Thank you for your answer, but I think this would be a very interesting feature for F2C. I don't know if this is possible within F2C but filtering some values from a Joomla table seems feasible to me.

For example, add an additional text field to the Access field in the F2C Content Type and exclude the values entered in that field in the select statement which populates the Access field in the F2C article manager, e.g.

Edit Content Type Field
Id:
Field Name: access

Additional field settings
Default value: ….
Exclude values: %Special%,Public,Guest (new field)

And populate the Access field in the F2C article manager, with a Select statement as for example:
SELECT title FROM `aaa_viewlevels` WHERE title not like '%Special%' and title not like 'Public' and title not like 'Guest'

Implementing this for all native Joomla fields would in my opinion be a strong improvement.

Still dreaming… I don't give up that fast ?
Didier.
Accepted Answer Pending Moderation
Hi Didier,

How about:


  • Databe lookup multi-select list with Access levels (or own multiselect list with the values you want)
  • Custom F2C plugin that writes the selected
    On save overwrite the access field values


Just a thought.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
Accepted Answer Pending Moderation
Hi Patrick
I don’t know if I understand you correctly, but this could be a ‘“universal” solution:
In the F2C Content Type definition:
Define (fill) a listbox with (selected/wildmark) values from a database table or own values
In the F2C article manager:
Select multiple values from the listbox
On save write the selected value(s) to the desired field
Only possible drawback I see: non-existing/conflicting values saved in native Joomla tables. But as this is F2C, we can assume that the person configuring this has enough knowledge.
Didier
  • Page :
  • 1


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