Home › Toolset Professional Support › [Resolved] Pre-filled field with parent field
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)
Tagged: Content-submission forms, Toolset Forms
Related documentation:
This topic contains 15 replies, has 2 voices.
Last updated by nabils 4 years, 8 months ago.
Assisted by: Minesh.
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.
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.
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.
The child form is added in
hidden link
The parent form
hidden link
sorry, but what is the flow to reach to your child form? Can you please tell me?
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.
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
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
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.
Inside this tab I have added a view the child link is in the view hidden link
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?
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
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.
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.
If you check your rental form:
=> hidden link
With rental price field I've added the urlparam attribute where I pass the property_price.