Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option to load custom fields #175

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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