Skip Navigation

[Resolved] Pre-filled field with parent field

This support ticket is created 4 years, 9 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 15 replies, has 2 voices.

Last updated by nabils 4 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#1506473

I am trying to:
Hi,
I have parent post "property" with field price and child post "rental" with field rental price. When creating new child rental, I want to have rental price field to be pre-filled with the value of the parent post field price . I used

  [cred_field field="rental_price" post="rental" urlparam="property_price"]

But this code do not show the value of parent field.

#1507023

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please share the problem URL where I can see the form as well as access details so I can check how you are passing the price value using the URL param.

*** 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.

#1508185

Minesh
Supporter

Languages: English (English )

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

Thank you for sharing access details but when I try to check the form link you shared it do not allow me to check and says you have taken the control for all pages.

However - I need the frontned link where the form is added as well as where is the parent form is added.

#1508211

The child form is added in
hidden link

The parent form
hidden link

#1508513

Minesh
Supporter

Languages: English (English )

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

sorry, but what is the flow to reach to your child form? Can you please tell me?

#1509429

In property layout there is a list of all rental. In the view of all rental related to a specific property there is a link (child form) to add new rental.

#1512961

Minesh
Supporter

Languages: English (English )

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

Sorry can you be more specific. I would like to know where I can see the Add New Child form item link?

I checked on the single property page - but I do not see any child form link:
=> hidden link

#1513905

In front end only the user who added the parent post can see the tab which has the link. So, if you go to property layout under rental tab you will find the link of the child form hidden link

#1514797

Minesh
Supporter

Languages: English (English )

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

Do you mean this tab as shown with the following screenshot?
=> hidden link

if yes:
- On front-end this is how I can seee the single property:
=> hidden link

I do not see any rental tab or child form link.

#1515851

Inside this tab I have added a view the child link is in the view hidden link

#1516079

Minesh
Supporter

Languages: English (English )

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

I do not think you are getting my point.

Ok - I can see the child link form is added with the following view:
=> hidden link

<td>[cred_child_link_form form='1334' parent_id='-1' text='Manage Payment' target='_self']</td>

But on the frontend - with the single property post - where I can see the child link "Manage Payment"? I do not see the child link on the following post.
=> hidden link

- Do I require to login as a different user other than admin - to see the link?

#1516153

Yes correct, this one was created with other logged in user so you can not see it on front end. For that I have created a test post with your admin login account so you can check please use
hidden link

#1516179

Minesh
Supporter

Languages: English (English )

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

So - within the view where you added the child form link to Add New Rental:
=> hidden link

I've removed the child form link shortcode you added and I've added the following link that will allow us to pass the property_price as URL param.

  <strong><a href="/add-rental/?parent_property_id=[wpv-post-id]&property_price=[types field='property_price' output='raw'][/types]" target="_self">Add rental</a>
     </strong><

When you click to add Rental link, I can see it redirects to Add Rental form and I also see the property-price also appended automatically to the rental-price field. Can you please confirm it works at your end as well.

#1516201

Many thanks for your support it is working fine now.
I would like to know where you pass property price to rental price since I can not see any changes in the rental form in rental price field.

#1516209

Minesh
Supporter

Languages: English (English )

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

If you check your rental form:
=> hidden link

With rental price field I've added the urlparam attribute where I pass the property_price.