Skip Navigation

[Resolved] How to make related post author field required

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

Problem:

I have a relation with post author and a custom field set. I can make every field required (I do not need to, but I can), except for the post author field.

As the client is testing it now an empty line appeared in the dropdown. I have no direct contact with the client so I can not ask him what happened, but I think making the field required could avoid empty lines in the future. Maybe I am thinking wrong, but now you can make a new order without selecting the author.

Solution:

How do you setup the post author field? is it a CRED generic field?
If it is, you can add argument "required" in the shortcode [cred_generic_field], for example:

[cred_generic_field type='select' ...]
{
"required":1,
...
}
[/cred_generic_field]

See screenshot https://cdn.toolset.com/wp-content/uploads/2018/01/604177-required.JPG

Relevant Documentation:

This support ticket is created 6 years, 10 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by Luo Yang 6 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#603930
Toolset 21.jpg

I have a relation with post author and a custom field set. I can make every field required (I do not need to, but I can), except for the post author field.

As the client is testing it now an empty line appeared in the dropdown. I have no direct contact with the client so I can not ask him what happened, but I think making the field required could avoid empty lines in the future. Maybe I am thinking wrong, but now you can make a new order without selecting the author.
See hidden link

And look at the screenshot to see what I mean with an empty line. How can I take that away?

Thanks in advance,
Jos

#603935

The 'empty line question' is solved.
The question "how to make the post author field required" is still there.

Cheers

#604177
required.JPG

Dear Jos,

How do you setup the post author field? is it a CRED generic field?
If it is, you can add argument "required" in the shortcode [cred_generic_field], for example:

[cred_generic_field type='select' ...]
{
"required":1,
...
}
[/cred_generic_field]

See screenshot required.JPG

#604344

Thanks Luo Yang, I should have thought of that myself ?

#604590

You are welcome