#1 October 1, 2015 1:24pm

jmason03
Member
Registered: January 9, 2014
Posts: 123

Custom Module Settings with Matrix

I'm trying to make a custom settings file for one of my modules. I've done it in the past successfully but always only used basic inputs like text, but now I'm trying to set one up and I'd like to use a matrix field. I'm not sure how to draw or process the field. My thought was that I had to define a $field array with the necessary values and then include the draw file but I feel like there's an easier way that I'm not thinking of. I was wondering if you had any thoughts or had set something up like that before?

Thanks

Offline

#2 October 1, 2015 1:27pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Custom Module Settings with Matrix

You're on the right track but in 4.2 you don't need to include draw and process files -- you can just pass the $field array like this:

<?php
    BigTreeAdmin::drawField($field);
?>

Likewise there's a BigTreeAdmin::processField function you can call on the $field array for processing which returns the processed return value.

Offline

#3 October 1, 2015 3:36pm

jmason03
Member
Registered: January 9, 2014
Posts: 123

Re: Custom Module Settings with Matrix

Oh yeah, I forgot that would save me a few steps. Thanks for the heads up, I was able to get it all working correctly!

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.