Skip Navigation

[Resolved] edit link ( for edit form) not showing

This support ticket is created 4 years, 3 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 13 replies, has 2 voices.

Last updated by evaM 4 years, 3 months ago.

Assisted by: Minesh.

Author
Posts
#1744671
Screenshot at Aug 19 21-19-13.jpg

Tell us what you are trying to do?

I tried it to and fro
created a my account trial page without any design

I want to add an edit link, that shows a content template with an edit form

and i cannot see it on the backend and also not on the frontend
i tried everything
i even threw out elementor and started designing the page from the bottom up without a design tool again
nothing helps

under edit basic profile input nothing appears
no link, nothing

Is there any documentation that you are following?
https://toolset.com/course-lesson/allow-users-to-manage-their-items/
https://toolset.com/course-lesson/creating-a-my-account-page/

Is there a similar example that we can see?
screenshot
What is the link to your site?
schpinn.at
but hidden under maintenance, if you need access, please ask

#1744929

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please tell me for what form you want to display the edit link and on what page (please share problem URL where you want to display the edit link)

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

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

#1745187

Minesh
Supporter

Languages: English (English )

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

Do you mean that the Edit link you want to display should be link to the post of post type "Profiles Main CPT" and the author of that post should be the same as loggedin user - correct?

having said that each author will have only one post available with the post type "Profiles Main CPT" - correct?

#1745197

each registered user can fill out ONE Profile, with PROFILES MAIN CPT
the author of this post is the same as the logged in user

the Profile consists of ONE Main Profile
and within this main profile i have many child cpts as a substitute for repeating fields

the page my trial my account page shall show all the forms to add and o edit data and also the results( using views)

#1745421

Minesh
Supporter

Languages: English (English )

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

each registered user can fill out ONE Profile, with PROFILES MAIN CPT
the author of this post is the same as the logged in user
==>
Ok great

We can take one question per ticket. so, I've added the following code to the "Custom Code" section offered by Toolset that will help to get the Profile ID of the current loggedin user:

function func_get_post_id_author_profile() {
   global $current_user;
    
   $author_id = $current_user->ID;
   $post_type_slug = 'profile-main'; 
  $args = array(
    'post_type' => $post_type_slug ,
    'author'=> $author_id,
    'post_status' => 'publish',
    'fields' => 'ids',
    'numberposts' => -1,
    
 );
$result = get_posts( $args );
  if(isset($result[0]) and is_numeric($result[0]) ){
    return $result[0];
  }else{
    return 0;
  }
     
}
add_shortcode( 'get-author-profile-id', 'func_get_post_id_author_profile' );

Then, I've created the following page and added the shortcode block to it and within the shrotcode block I've added the Edit form:
=> hidden link

[cred_form form='edit-profile-main-form' post="[get-author-profile-id]"]

- As you can see the post ID to be edited will be returned by the shortcode: [get-author-profile-id]

Then, to the page where you want to display the link:
=> hidden link
- I've added the "Edit Main profile" link using "Fields and Text" block.

Can you please confirm it works at your end.

#1745427

yes this works great

but it leaves me completely confused
and somehow shocked

i thought i could use tooleet without knowing and needing any code
and now it turns out i do have to know about code, which i do not

and i have to build more stuff,
if all that would be that complex an implements code it is undoable for me

this makes me feel really left alone now

do you have a way without code for me?
otherwise i am really smashed

#1745429

is this thing not a normal way in toolset without coding?

"so, I've added the following code to the "Custom Code" section offered by Toolset that will help to get the Profile ID of the current loggedin user:"

#1745435

.

#1745441

Minesh
Supporter

Languages: English (English )

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

To get the profile ID of current logged-in user - you will require that shortcode I shared.

Most of the things you can build without code but at some point like this requirement where is requires the such code to grab such dynamic content and it depends on your requirement.

#1745451

so i need help with every further step now?

#1745465

why doesn't that tutorial work for me... where is the difference?

https://toolset.com/course-lesson/allow-users-to-manage-their-items/

#1745467

Minesh
Supporter

Languages: English (English )

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

We entertain only one question per ticket. As this will help other users searching on the forum as well as help us to write correct problem resolution summery for the original question raised while creating the ticket.

You are welcome to create as many tickets as you want and our supporters are happy to assist you further.

As your original issue is fixed about displaying editing link and display the edit form for the main profile post whose author should be the current loggedin user and its been already addressed. I urge you to mark resolve this ticket and open a new ticket with each new question you may have.

#1745471

My issue is resolved now. Thank you!