Hey there,
I am using a generic field generated using comma-separated data. When there is no data in the field, I would like to show a message to the user that there is no data in the field.
For that, I was thinking of adding a conditional statement in the CRED form that checks if comma-separated values exist or not. If it is empty, it would like to show - 'You have not submitted a project. Please submit a project before requesting an endorsement'.
<div class="form-group project-submission-form-group">
<label>[cred_i18n name='project-submission-label']Select Project Submission(s) (use command or ctrl key to select more than one project)[/cred_i18n]<span class="red-color">*</span></label>
[cred_generic_field type='multiselect' field='project-submission']
{
"required":1,
"options":[ [xyz-ics snippet="Dynamic-list-of-project-submissions-by-current-user-not-part-of-group-submission"] ]
}
[/cred_generic_field]
</div>
Form view - hidden link
Hello,
I assume we are talking about the custom shortcode you mentioned above:
[xyz-ics snippet="Dynamic-list-of-project-submissions-by-current-user-not-part-of-group-submission"]
There isn't such kind of built-in feature within Toolset plugins.
I suggest you create a post view:
- Query project posts
- Filter by post author is same as logged in user:
https://toolset.com/documentation/user-guides/views/filtering-views-query-by-author/
- If there isn't any result found, display the message:
You have not submitted a project. Please submit a project before requesting an endorsement
- If there is any result found, display post form you mentioned above.
My issue is resolved now. Thank you!