Jump to content

Recommended Posts

Posted

Hi all,

I am trying to create a page field type that let the user choose a field among the list of the all the fields (to clarify: the list of fields under Setup > Fields), but I cannot make it work.

I tried this:

I created the field, I set the type to "Page", I went to Input tab and changed the attribute "Parent of selectable page (s)" : here I select "Home > Admin > Setup > Fields".

The problem is if I go to the page the new field is there but the dropdown is empty, there are not values in it.

Why? Is it because core pages like templates or fields are hidden by default?

Any help is appreciated. Thank you!

Posted

This isn't possible with a page field, but I have quickly modified hani's Template ASM Select to create a Field ASM Select fieldtype.

Let me know if this works for you as expected - maybe it should be released properly in case others might find it useful.

FieldtypeFields.module

  • Like 8
Posted

adrian, you are a machine! Do you sleep?   :)

haha :)

Well to be honest, that hack of hani's module was about as easy as it gets - literally just a find/replace of "template" with "field" and it works :)

I am actually wondering if FieldtypeModules, FieldtypeTemplates, and now FieldtypeFields should become one module so that we can have one codebase to maintain, but the dev can choose whether modules, templates, or fields are what is available for selection. Of course this option would have to be from the field settings, and not the module config settings so it could be on a field by field basis. Do any users of FieldtypeModules or FieldtypeTemplates have any thoughts on this?

  • Like 5
Posted

Great solution Adrian, thank you very much!!!

Didn't know about the existence of FieldtypeTemplates...

The support in this community is unbeatable! :)

  • Like 1
Posted

I am actually wondering if FieldtypeModules, FieldtypeTemplates, and now FieldtypeFields should become one module so that we can have one codebase to maintain, but the dev can choose whether modules, templates, or fields are what is available for selection. Of course this option would have to be from the field settings, and not the module config settings so it could be on a field by field basis. Do any users of FieldtypeModules or FieldtypeTemplates have any thoughts on this?

I'd support that. Just drys out the process. Especially if you need more than one type.

  • Like 3
Posted

I actually believe separate modules is way to go. FieldtypeModules has quite a bit configuration already, bundling fields and templates there would make things complex where they doesn't need to be.

Also what would that field be called? FieldtypeNotPageRelation? :)

  • Like 1
Posted

I've never used FieldTypeModules — didn't realize they weren't all fairly similar and straightforward.

Antti, would FieldtypeModulesTemplatesFieldsRelationSelector not work?  haha!

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...