AxeWP / wp-graphql-gravity-forms

GraphQL API for interacting with Gravity Forms.
GNU General Public License v3.0
165 stars 29 forks source link

defaultValue for Email field doesn't work #391

Closed Gytjarek closed 10 months ago

Gytjarek commented 10 months ago

Description

Email field doesn't return defaultValue. Works when confirmation email is used though.

Steps to reproduce

Assign defaultValue for the email field

Additional context

No response

Plugin Version

0.12.4

Gravity Forms Version

2.7.8

WordPress Version

6.3.1

WPGraphQL Version

1.16.0

Additional enviornmental details

No response

Please confirm that you have searched existing issues in the repo.

Please confirm that you have disabled ALL plugins except for Gravity Forms, WPGraphQL, and WPGraphQL for Gravity Forms

justlevine commented 10 months ago

Hey @Gytjarek

Thanks for flagging this - got it fixed in #394

justlevine commented 10 months ago

And released in v0.12.5

adam-ainsworth commented 8 months ago

Hi,

I don't think this has been fixed - defaultValue still isn't in the fields on an email input (see attached)

I had a little play with the code and it doesn't look like the patch is being called

I'm happy to try further tests if needed

Thanks

image

justlevine commented 8 months ago

Hey @adam-ainsworth 👋

The defaultValue should be available on the field.inputs array.

I'm overseas on location for a client this week, but let me know if it's not working and I'll dive in once I'm back.

adam-ainsworth commented 8 months ago

Hi @justlevine - thanks for getting back to me and apologies for disturbing you while you're away. I'm afraid I'm not seeing it, with either the single email field or with the confirmation field activated

image

I am running on the latest version (0.12.5) of the plugin

Absolutely no rush on this, so just whenever it is convenient - thanks again :-)

justlevine commented 8 months ago

No disturbances at all, was just setting expectations 😎

Im pretty sure defaultValue is applied via a specific interface, which is why you're not seeing it there. Would need to be ... on GfFieldInputWithEmailConfirmationSetting { defaultValue } or something similar.

Hopefully if you open the documentation explorer on the right side of the IDE and search defaultValue you'll be able to find exactly where that field is applied to the GraphQL object. As soon as I'm by my desk I'll try and share a repl 🤞

adam-ainsworth commented 8 months ago

Ah yes - that's got it

image

Thanks very much for your help!