This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

jess11443
jess11443

I've created a static pages block that allows the user to build a purpose built form for that page

I'd like to give them the option from within the block config to choose what confirmation email the visitor can receive from the mail templates but not sure on my block.yaml file how i can give a dynamic drop down option that looks up the mail templates and allows them to select one.

daftspunky
daftspunky

Hey Jess!

For the options you should be able to specify a static method reference to a class. So if you had a class

class MyClass {
    public static function optionsMethod() { return [...]; }
}

You can specify options from MyClass::optionsMethod as a string and it will look for that class and method to locate the options.

I hope this helps

jess11443
jess11443

daftspunk said:

Hey Jess!

For the options you should be able to specify a static method reference to a class. So if you had a class

class MyClass {
   public static function optionsMethod() { return [...]; }
}

You can specify options from MyClass::optionsMethod as a string and it will look for that class and method to locate the options.

I hope this helps

Perfect - Thanks!

Last updated

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.