Skip Navigation

[Resolved] Custom Relationship Drop Down not working correctly

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 7 replies, has 2 voices.

Last updated by MattI4840 4 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#1485445
NewJobError.png

I am trying to:

I have a post form that uses a cred_generic_field to display a list of customer sites (sites are customer locations with fields for contact info an such) in a select field. The customer site values are populated via custom shortcode. I've used this same logic on several post forms ("New Estimate", "New Service Request") and it works as intended. However when I use it for post form "New Job", I get the error message attached and the post is not saved. The only difference between the forms is the relationship field being used by the cred_generic_field, but they are all one to many relationships.

Link to a page where the issue can be seen:

New Job Form (not working): hidden link

New Service Request (working): hidden link

I expected to see: The job being saved correctly.

Instead, I got: The error message in the screenshot

#1486033

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please share the installer.php file as well with the duplicator package you shared.

#1489479

Minesh, Sorry about that, I've added the installer file to the share.

#1490121

Minesh
Supporter

Languages: English (English )

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

Thank you for sharing the installer file.

I deploy the duplicator on my local test install and I found that you are using really outdated Toolset plugins. We always recommend running your site with the latest stable release plugin version.

*** Please make a FULL BACKUP of your database and website.***
Could you please update ALL Toolset plugins to it's latest officially released version. You can download the latest plugin release from your accounts page:
=> https://toolset.com/account/downloads/

Once you update ALL plugins to a latest official release version - do you see the same issue?

#1491043
DragNDrop.png
NewJobForm.png

Minesh,

Yes I'm still seeing the same issue after updating all plugins. Additionally after the update there appears to be an issue with editing my post forms. As an example if you look at the 'New Job' form on the front end you can see all the fields as they were when I set them up (see screenshot NewJobForm) before the update. But when I go in to edit the form, it populates the drag and drop form editor with different fields, and if I click on Expert Mode, it displays the code for what was in the drag and drop editor, not what the form actually displays on the front end (aka what I coded by hand) per the below and the DragNDrop screenshot attached.

I've also placed a new Duplicator Pro package on the site I previously sent you if you want to see it in action.

[credform]
	<div class="form-group">
		<label>Job Site Address</label>
		[cred_field field='job-site-address' force_type='field' class='form-control' output='bootstrap']
	</div>
	<div class="form-group">
		<label>Job Site Contact Name</label>
		[cred_field field='job-site-contact-name' force_type='field' class='form-control' output='bootstrap']
	</div>
	<div class="form-group">
		<label>Job Site Contact Number</label>
		[cred_field field='job-site-contact-number' force_type='field' class='form-control' output='bootstrap']
	</div>
	<div class="form-group">
		<label>Job Site Contact Email</label>
		[cred_field field='job-site-contact-email' force_type='field' class='form-control' output='bootstrap']
	</div>
	<div class="form-group">
		<label>Job Type</label>
		[cred_field field='job-type' force_type='field' class='form-control' output='bootstrap']
	</div>
	<div class="form-group">
		<label>Job Status</label>
		[cred_field field='job-status' force_type='field' class='form-control' output='bootstrap']
	</div>
	<div class="form-group">
		<label>Job Frequency</label>
		[cred_field field='job-frequency' force_type='field' class='form-control' output='bootstrap']
	</div>
	[cred_field field='form_submit' output='bootstrap' value='Submit' class='btn btn-primary btn-lg']
[/credform]

Thanks,
Matt

#1494537

Minesh,

Any update on either of these issues? They are really holding up development now, especially if I am going to need to recreate all of the forms. Please let me know as soon as you can.

Thanks,
Matt

#1494715

Minesh
Supporter

Languages: English (English )

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

Ok - So, I've edithed the following form:
=> hidden link

You should switch to the "Expert Mode" and add the following code to your form and save the form:

[credform]

<label>Customer</label>
[cred_field field='@customer-job.parent' class='form-control' output='bootstrap' select_text='--- not set ---' urlparam='parent_customer_id']
<label>Site</label>
[cred_generic_field type='select' field='@customer-site-job.parent' class='form-control' output='bootstrap']
{
"required":1,
"options":[wpv-view name="list-client-sites"]
}
[/cred_generic_field]
<br>
<label>Job Type</label>
[cred_field field='job-type' force_type='field' class='form-control' output='bootstrap' value='-- Select Type --']


<br>
	 
	[cred_field field='form_submit' output='bootstrap' value='Submit' class='btn btn-primary btn-lg']
[/credform]

Once you save the form - Please access it at the frontend:
=> hidden link

I can see the new entry is successfully created. Can you please confirm it works at your end as well.

#1513449

Minesh,

Apologies, I thought I had responded to let you know this issue is now resolved. Thank you for your help sir!

Matt