Skip Navigation

[Resolved] how to generate paramerter value from user custom field

This support ticket is created 3 years, 8 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: Africa/Casablanca (GMT+00:00)

This topic contains 28 replies, has 3 voices.

Last updated by Jamal 3 years, 6 months ago.

Assisted by: Jamal.

Author
Posts
#1718831

Tell us what you are trying to do?

I would like to generate a link with parameters which data pulled from post author's information. However, I cannot display user's custom field information.

I have set a view to generate link. This link should pass post's author's information to the next page (gravity form with hidden fields). However certain parameter cannot be generated. I am sure there is something wrong with my view settings. But I cannot find the workaround.

Let me explain the setup.

Basically, when when you go to a page like this.

hidden link

When you sign in as a any WordPress user, you will see Request information link
The link goes either the #1 or #2 depending on the account of user.

I have these 2 links need to be properly working. These links will be displayed based on a conditional view which I set up separately already.

#1 hidden link
#2 hidden link

The link generate a series of parameters. They are supposed to pass down to the destination page so gravity form can capture the parameters and fill in the form including hidden forms.

I am having problems generating these parameters. If if you can take a look the views in admin dashboard, you can give me advices to make them work.

So far, I figured..

[wpv-post-author format="meta" meta="first_name" item="$current_page"]
works fine as long as I can choose the value from the pull down list. But I would like to display not only build-in field but also custom fields.

I set these fields and more to set custom fields, but not working.
[types usermeta='agent-lic' user_is_author='true'][/types]
[types usermeta='broker-address' user_is_author='true'][/types]

They somehow displays unrelated data(or not pointing the right id). But it doesn't pull the proper information from proper user.

What is the link to your site?

hidden link

I would like to provide admin access, please set it up a form for me.

#1719109

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

It looks like I will require access details to access the View links you shared.

do you mean that one I'm on the following page: I will require to register as new user using the connect button?
=> hidden link

Or

Can I use any existing registered user - if yes, can you please share admin access details + frontend user login access details and exact flow I need to follow and where exactly you want to pass the custom field values as URL params.

#1720291

Minesh
Supporter

Languages: English (English )

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

After login to admin I've visited the following page: hidden link
- I do not see any "Request Information" link.

Can you please guide me where I can see the "Request Information" link?

#1723295

Sorry it was not set up for admin account. I changed it. Please try again.

#1726209

Have you been able to take a look this???

#1726643

Minesh
Supporter

Languages: English (English )

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

I can see now "Request Detail" button and I can see with the two view link you shared, you are using the view and you set the view to filter by POST ID as url param (id).

But when I checked the following page - I do not see you are passing any post ID as URL param (id).
=> hidden link

I would like to know what information is missing or not displayed as expected with your "Request Detail" button link.

#1730125

On this link,

hidden link

I am missing list_id is supposed to fill the 4 digits id from parent post. But it doesn't return anything.
And somehow it pulls the same information for price and title no matter which post I select and click request information button.

No matter what post I select and click request information button, it somehow pull this post's info(hidden link)

You can try it by clicking ramdom link "View More infomation" from the top page. And click Request Details.
Then copy URL link and paste and compare them. They all contains the same list ID, titile and price(the one Colorado-listing-1)

I don't know why.
These logic used be working fine...

Please help me.

#1730411

Minesh
Supporter

Languages: English (English )

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

I checked the post relationship "Listings listing Relations" where there is one to one post relationship setup with your post type
Public Listings (parent) and Restricted Listings (child).
=> hidden link

I'm not sure what content you want to display as you are using the following view which is set to query both post type: Public Listings (parent) and Restricted Listings (child).
=> hidden link

And within the above view - you have added many conditional statements and added the following view:
=> hidden link
- I've changed the list_id shortcode as: &list_id=[wpv-post-id item="@listings-listing-relation.child"]
Because the "NEW Link to the NDA Request form" (ID:1420) - is set to query the post type "Public Listings" which is actually a child post type not parent post type.

Can you confirm now - you are getting the right list_id value now and also confirm what user details you want to display exactly where.

#1733753

Let me explain...

On our website, 1 business listing comes with 2 custom post types

Public Listing
AND
Restricted Listing

As you found, they are in relationship.

Public list contains information general public can view. If anyone is interested in more detail, they sign up to our site and click Request Information button. By filling the form and click next. it goes to an e-signature page and all information is automatically filled by gravity form parameters(including customer's information, name, phone, email etc. and agent(list author) name phone, license number. AND the ID of list.

After signing e-signature, the system grand access the user to a corresponding restricted listing by following list ID.(this was done by WP-fusion's custom coding)

What I need display at least price and list_id right.
When you take la look

hidden link
andRequst Details link shows
hidden link

As you can see list always set List_id as 9926 and the price as 198000. They don't belong to
hidden link

It actually belongs to this post.
hidden link
(this is the newest post on this post type)

If you check other Request Detail link on other post, their list_id and price always point this post above.
I think there is something wrong is shortcode setting or something, but I cannot figure it out.

I am guessing it just displaying list_id and price of the newest post on the same post type. But I don't know why it's happening.

Do you see what I am trying to do?

#1733817

Additional to my questions,

#1 my top page search is acting little differently now.
When you see 1 State selection, it used to show all available states, but now it shows only few(it looks like only shows where the lists are published). and County also shows only limited selections (seems its following the same rule. And 3.Area changes just like that.

#2 Alcohol License radio button is supposed to show Yes, No, and N/A. But it only shows N/A. (This was working fully fine before but it stopped working now.

It might not suitable for this existing thread, it's easier to explain here since you have the basic idea of what I am talking about.

#1734733

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello! As Minesh is on vacation this week, I would like to continue on this ticket with you.

I understand that you want to build the URL parameters from different elements of data:
- Current logged in user.
- The public listing.
- The author of the public listing.
- The private listing related/linked to this public listing.
Right?

From what I can see in the content template of the loop "Loop item in NEW Link to the NDA Request form" for the view "NEW Link to the NDA Request form" (#1420):
- list_id: should be the one(ID) from the related private post, right?
- price: should be from the custom field "business-price" of the public listing post, right?
If this is what is expected, I think that there is an issue there, either from a caching system or a conflict with a plugin(probably Gravity form, or another one), that interfere with Toolset shortcodes and give wrong results.

I will suggest testing this in a minimal setup, with only Toolset plugins and a default theme such as TwentyTwenty. If the issue disappear, we can switch the theme back, and activate plugin one at a time to detect where the conflict is triggered.

I can also create a test installation on our platform and check together in a minimal setup if we would be able to generate a correct link without using any third party plugin during the tests. How does it sound to you?

#1735143

Jamal,

Thank you for understanding what I want to do.
You got me!

As you suggested, I tried to de-activated all plug in and switched theme to twenty-twenty but It didn't solve the issue.
As I suspected, all the link displays the ID and price from the newest post. I published a new post, and now all other pages' link displays id and price from this post.

Please take a look. I don't know where and what to fix...

#1735745

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

In order to exclude any possible cache issues from a server-level caching, such as Varnish, Redis, Memcache, etc. I have created a new installation on our platform. Please follow the instructions on my previous private reply(August 12, 2020 at 10:15 am) to migrate your website to it.

Once the migration is finished, I'll investigate why is the content template pulling the data only from the last post to be created.

#1738063

Please remember to take a look my additional questions #1 and #2 from earlier as well, please.

#1740215

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Sure, we'll do, however, for support rules, we are able to handle only one issue at the time. This helps us to bring you a better service and also helps other users to find all the information here exposed.

Please follow the instruction on my private reply(August 12, 2020 at 10:15 am) to migrate your website and we'll check this ticket issue. I'll check the other issues too. See this screenshot to view the private reply hidden link

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.