Jump to content

Recommended Posts

Posted

Hi all,

Just another quick question, how would I select a previously created field group so that I can add it to a template using the API?

All the examples I have seen thus far are creating the field group and adding it to a template at that point, I would rather create all my field groups beforehand and then assign them to their templates in batch.

Posted

Im an idiot, turns out I had already figured this out previously somewhere else among the code for the same module!

Anyway for anyone wondering I managed to retrieve them with:

 

$fg = wire('fieldgroups')->get('field-group-name');

 

  • 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...