Skip Navigation

[Waiting for user confirmation] toolset access

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.

This topic contains 29 replies, has 1 voice.

Last updated by Christopher Amirian 4 days, 11 hours ago.

Assisted by: Christopher Amirian.

Author
Posts
#2827125

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

if i open the gallery tab and add a picture , it creates a new post xyz/.... the picture is not add to the current event im on. ive not even started on the edit form yet.
===>
Well - the post created under xyz and xyz post is related to that event for that perticular user.

Do you want me to setup a demo on your site?

#2827129

Yes please that would be great

#2827219

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

For now, lets talk about the "Gallery" tab as whatever method or correction will be applied it will be applied to all other tab/forms.

I see you created the following XYZ Gallery forms:
XYZ gallery Add form:
- hidden link
Where:
I see you set the post status to pending.

I've added hidden custom field and given the slug "@trial-xyzs.parent" and its default value will be "[wpv-post-id]" so as soon as you submit the entry the post will be attached to current trial event post.

I've also added hidden field that will hold the "post_title" and given the default value as "[wpv-post-id]-[wpv-current-user field='ID']". You can check the above form.

XYZ gallery Edit form:
- hidden link
Where:
I've removed the "post_title" field as it was not required and I've set the above form's post statue to "Keep Original Status"

I've created the following view "check-current-user-xyz-posts"
=> hidden link
Where:

I've added the following "Query Filters":

Post author filter
Select posts with the author the same as the current logged in user.

Post status filter
Select posts with status of publish or pending or private.

The above view will try to get the post ID for the current loggedin user for the XYZ post type and if there is no post found it will return 0. As you can see the "Loop Editor" section is code is adjusted as given under:

[wpv-layout-start][wpv-items-found]<!-- wpv-loop-start --><wpv-loop>[wpv-item index=other][wpv-post-id],[wpv-item index=last][wpv-post-id]</wpv-loop><!-- wpv-loop-end -->[/wpv-items-found][wpv-no-items-found]0[/wpv-no-items-found][wpv-layout-end]

Now, I've created the following content template that will be used to display under the "Gallery" tab namely "ct-for-gallery-tab":
=> hidden link

[wpv-conditional if="( '[wpv-view name='check-current-user-xyz-posts' cached='off']' eq '0' )"]
showing add form
[cred_form form="xyz-gallery"] 
[/wpv-conditional]

[wpv-conditional if="( '[wpv-view name='check-current-user-xyz-posts' cached='off']' ne '0' )"]
showing edit form

[cred_form form='xyz-edit' post="[wpv-view name='check-current-user-xyz-posts' cached='off']"]
[/wpv-conditional]

As you can see I used the conditional shortcode where I'm displaying the "XYZ" post type add form if there is no post found for the current user.

In case of current user has XYZ post - then we will display the edit post and to determine what is the post ID to edit XYZ post entry for the current user - it will be returned by view:

post="[wpv-view name='check-current-user-xyz-posts' cached='off']"

At last, with your Elementor template, I've removed the Toolset form module you added and instead I've added the shortcode module and inside the shortcode module I've added the content template that we created for the gallery "ct-for-gallery-tab":
=> hidden link

[wpv-post-body view_template="ct-for-gallery-tab"]

Now, we have this setup for "Gallery" tab, if user loggedin and there is no XYZ post form for that user, it will display the XYZ add form to add gallery items and if there is post found for the current user it will display the edit form to Edit the gallery items for XYZ post.

Can you please confirm first this much works and then we can take step forwared.

#2827332

hi minesh thanky you so much for this , i had a check of this .
as admin i see the add to gallery form , if i add an image it take me to a blank page with an xyz....... slug. i also get the image in the xyz post in the wordpress backend .
if i then publish the post (from pending) the xyz post goes live but the image is not added to the trial/event page.

also if i am logged in as a normal user under gallery tab i just see showing add form.
the preview can be changed to published on the form , so it instantly goes to the event/trial page.

i have to say you really know this software well. its quite impressive what it can do with some one knowledgeable driving it.
many many thanks

#2827336

sorry I see the ct for the gallery is adding showing add form. i presume once the access for listivo user is arranged it will show the form . once again thankyou
martin

#2827370

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

if i then publish the post (from pending) the xyz post goes live but the image is not added to the trial/event page.
==>
That thing is pending.

What we have done is we used XYZ post type to manage the gallery and other fields that will allow us to manage content per user which you wanted.

Now, when user publish the post, where you want to display the gallery images - under the gallery tab only and the images belongs to the current loggedin user only?

#2827371

thankyou minesh , anything added can go live (published) it does not need to be pending.

the images can be viewed by anyone (logged in or out) but only the person and admin can edit the images uploaded

and yes in the gallery under the gallery tab
thanks

#2827518

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Minesh is not available today but he will be available tomorrow to answer the question.

Thank you for your patience

#2827634

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

thankyou minesh , anything added can go live (published) it does not need to be pending.
==>
you can check the forms to add new item and set the post status as published instead of pending.

the images can be viewed by anyone (logged in or out) but only the person and admin can edit the images uploaded
==>
To the content template that displays the gallery:
- hidden link

I've added the following shortcode at top:

[types field='image-from-toolset-form-upload-for-single-event' title='%%TITLE%%' alt='%%ALT%%' size='medium' resize='proportional' separator=', '][/types]

This shortcode will display the gallery images from the event post.

Then I've created the following view:
- hidden link

And added the above view just after the above shortcode:

[wpv-view name="show-all-gallery-images-from-xyz" cached="off"]

The above view will display the gallery images belongs to all users and after that you will see the form add/edit where user can either add/edit gallery images.

#2828038

thankyou so much minesh , ive had a heavy work schedule sorry for my delay in replying. i see it works perfect when i am admin , but as a standard listivo user i dont see the form to add an image. as a listivo user i can see the admins images and cannot edit them . i think its almost perfect !!
thanks again
martin

#2828190

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please share couple of "listivo" user and send me access details for those and let me check.

However - what listovo user you tried with?

I have set the next reply to private which means only you and I have access to it.

#2829132

was there a solution to this issue ? thanks

#2829150

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check now.

I've navigate to Toolset => Access Control => Toolset Forms and set the permissions for your forms you created for the "Listivo User" role you created.

You can recheck it and also set the correct permission for the add/edit forms you created.

I've also set the XYZ post type from Toolset => Access Control => Post Types and set it to managed by Toolset access and also set the permission for the "Listivo User" role.

When I login as "shez984531" user you shared - I can see the form to add gallery now under the gallery tab.
- hidden link

#2830150

fantastic , thanks so much for you help in this , sorry for the late reply i didnt see the email. many many thanks minesh

#2831305

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Minesh is on vacation but I will inform him. Thank you.