Skip Navigation

[Resolved] Custom field not showing up as an option in the CRED email notification settings

This thread is resolved. Here is a description of the problem and solution.

Problem:
I want to only send the email if a checkbox is "checked" for any given post.
I set up this field and was expecting it to show up in the email notification configuration options of Toolset Forms.

However, it does not appear as an available custom field.

Solution:
That condition basically listens to what you inserted to the Form Content Editor
So if there the field is not present, it cannot be in the notification settings
You may want to make sure you first autogenerate the form.

This support ticket is created 6 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 4 replies, has 2 voices.

Last updated by PaulS4783 6 years, 5 months ago.

Assisted by: Beda.

Author
Posts
#952105
customer-email-field.png
cred-notification-settings.png

I have a custom post type "Shipments"
It is configured to send an email to customers whenever a change is made to the post on the back end (or front end).

I want to only send the email if a checkbox is "enabled" for any given post.
So I added the custom field "Customer Email Enabled".

I was expecting it to show up in the CRED email notification configuration options.
I want to set a rule "Send email IF field equals 'Enabled' "

However, it does not appear as an available custom field.
Have I configured the custom field incorrectly?

See screenshots.

#952226

That is strange.
I can see both Checkbox fields that I set to save 0 like you or the default recommended "save nothing".
(Recommended because the "save 0" is not supported anymore by Views in Queries)

I can see both Fields when I add a notification to a Form and set conditions to be sent by field.

Can you test this with no other plugins, updated to the latest versions, and check wether or not it makes a difference on your install when you use a Checkbox Field that does NOT save 0 to the database (as it's set natively)?

If that does not help anything, can you add log in details?

==> As well, that condition basically listens to what you inserted to the Form Content Editor
So if there the field is not present, it cannot be in the notification settings
You may want to make sure you first autogenerate the form.

#952245
all-are-true.png
custom-field-config.png

As well, that condition basically listens to what you inserted to the Form Content Editor
So if there the field is not present, it cannot be in the notification settings
You may want to make sure you first autogenerate the form.

Thank you. That was a key part of the puzzle.
I added the field to the CRED form and now it appears as a notification email option!

HOWEVER...
I'm not sure I have configured the custom field correctly.
See screenshot attached.

And in the email notification section should I be using the string "Enabled" or a numeric "1" or "0"?

When I set the condition to "all are true" it doesn't send.
If I set "any are true" it sends.
So apparently it is reading the second test as "false".

#952773

As said, I suggest not to use that 0 value.

It will not work in Views, and I suggest, not to use it elsewhere if not determinately needed.

I suggest to create a Custom Field that natively saves 1, or nothing.
Don't alter what the GUI suggests when creating the Field (as well do not use custom display values) if you do not explicitly need.

Then, once you created basically a venially checkbox field, you use that in the notifications by:
- adding the Field in the Form's Body
- Choosing "When Custom Fields are Modified"
- There choosing the Fields you want to listen to
- Set a comparison to the value (usually 1, or nothing)

That should work fine.

In this case such fields should not store or display "manipulated" data but as raw and simple as possible.
Conditions, are a complex process.
The more complex content you process with it, the more affected it becomes by failures or glitches.
(Not necessarily in the code)

Can you try with a "native" field setup?

#952817

Bingo!
Followed your clear instructions the second time and it works now!!
(still confused about what "venially" means)

Perhaps OTGS should remove deprecated interface elements if they don't work anymore?
I'm sure there is a reason for keeping them.

You can close the ticket.