Skip to content

Added option to load custom fields#175

Open
DHoogland wants to merge 3 commits intoam-impact:masterfrom
DHoogland:master
Open

Added option to load custom fields#175
DHoogland wants to merge 3 commits intoam-impact:masterfrom
DHoogland:master

Conversation

@DHoogland
Copy link

@DHoogland DHoogland commented Apr 19, 2018

Added the option to load custom fields from external plugins.
I use this my self to load a custom address field with address auto completion from the zip code/house number.

Add this function to your main plugin class to return your field(s):

    /**
     * @return array
     */
    public function amFormsCustomFields()
    {
        return ['FieldNameHere'];
    }

Added an option to load custom fields from external plugins
removed unnecessary array_merge()
@iemand002
Copy link

I'm trying this in a project of mine and it works until it wants to get the $input on line 400 in AmForms_FormsService as it is searching for the template in the amforms plugin. How did you manage to work around that?

@DHoogland
Copy link
Author

I made this PR a while ago and don't have access to the repository anymore to check how I actually did that. I think it was something with the structure _amforms/field in your projects templates.
Maybe @hubertprein or @FrankZwiers can confirm this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants