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

get_field() returns rendered form instead of the form ID #24

Open
thisischrisj opened this issue Apr 23, 2015 · 3 comments
Open

get_field() returns rendered form instead of the form ID #24

thisischrisj opened this issue Apr 23, 2015 · 3 comments

Comments

@thisischrisj
Copy link

Calling get_field() echos out the form instead of returning the ID (as per the instructions)

@jonathan-dejong
Copy link
Contributor

I'll build upon this. I looked at the code and honestly it needs some work.
You do a echo in acfs format_value when it should return a value.

You also assume a lot by fetching the form object and then echoing it straight up (using do_shortcode.. why?) with the ID (which one already have) and the title (which one might not want to display).

I'll probably do a fork and change this. I'll make a pull request and it's your choice if you want to use it :)

Doing an echo in the format_value function actually throws an 502 error on my local nginx enviroment so that's another reason why it's a bad idea.

@jonathan-dejong
Copy link
Contributor

@thisischrisj
Here's my pull request if you want it :)
#25

@thisischrisj
Copy link
Author

Thank @jonathan-dejong

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

No branches or pull requests

2 participants