Skip Navigation

[Resolved] Unable to customise post relationship form

This thread is resolved. Here is a description of the problem and solution.

Problem:

I would also like to hide the second field in the relationship form as there is no point displaying it given that my form is displayed on the parent post.

Solution:

You can hide the field with CSS codes, for example:

https://toolset.com/forums/topic/unable-to-customise-post-relationship-form/#post-1209228

Relevant Documentation:

https://toolset.com/documentation/post-relationships/selecting-parent-posts-using-forms-create-child-items/#creating-forms-when-a-parent-post-is-preselected

This support ticket is created 5 years, 2 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: Asia/Hong_Kong (GMT+08:00)

This topic contains 7 replies, has 3 voices.

Last updated by Greig Neilson 5 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1201347

I am trying to modify the content of a post relationship form. I would like to change the label on one of the form fields and modify the placeholder content in the select menu.

I would also like to hide the second field in the relationship as there is no point displaying it given that my form is displayed on the parent post.

Attempting to make any change to the form content in the Form Editor panel or the in the Messages panel results in everything between the [cred-relationship-form-container] tags being deleted. This looks like a bug. I am using Expert Mode on the form.

#1201646

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

I would like to change the label on one of the form fields and modify the placeholder content in the select menu.
==> Which field label you would like to change? Can you share problem URL where you added the form as well as access details.

I would also like to hide the second field in the relationship as there is no point displaying it given that my form is displayed on the parent post.
=> I think that field is required as it will automatically selected the parent option but I will check if we can remove that.

Attempting to make any change to the form content in the Form Editor panel or the in the Messages panel results in everything between the [cred-relationship-form-container] tags being deleted. This looks like a bug. I am using Expert Mode on the form.
==> I do not able to reproduce this issue as I can see we already set a message that says:

Changes that you make in the HTML editor will be lost if you switch back to the Visual editor.

Can you please share access details and problem URL.

*** 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 would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

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

#1202320

Minesh
Supporter

Languages: English (English )

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

1. I would like to change the label on Routes to read "Please select a route." I also want to customise the "search for a post" to "search for a route"
===> I've split the ticket and answered your query there.
- https://toolset.com/forums/topic/split-unable-to-customise-post-relationship-form-change-the-select2-placeholder-in-relationship-form/

2. This form is displayed within a parent post. There's no point having the student's name here as it can't be changed anyway. It would be great to apply a class to hide it, but, as mentioned above, when I try and edit the HTML everything disappears from the form.
===> Yes, thank you. I think this is a good feature request. You can submit the feature request using the following form:
- https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

If you still need assistance with this - would you mind to create a new ticket and assign it to me?

3. I appreciate your reference to the warning message but it does not apply here. When I created the form I was in Expert mode. I did not try and change to Visual mode. (I don't like Visual mode at all - it erases any customisations I have made to my forms so I don't use it)
===> Yes - I confirm this bug and I reported to our next level support for further debugging. Please hold on for further updates.

#1204518

Minesh
Supporter

Languages: English (English )

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

We have published the errata for this issue. Could you please follow the instruction given with the following link and try to resolve your issue.
=> https://toolset.com/errata/changes-done-using-expert-mode-with-post-relationship-forms-are-not-saved/

The fix will be hopefully shipped early next week with the next release of Toolset Froms plugin.

#1207764

Minesh
Supporter

Languages: English (English )

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

Can you please confirm that relationship form issue is fixed.

#1208987

Hi Minesh

I added a feature request re. #2 and Amir wrote to suggest that I hide the field using CSS.

I'm happy to try that, but I can't find any documentation on using the "Additional classnames" or "Additional inline styles" fields on the Visual Mode form.

#1209228

Hello,

For the question:
but I can't find any documentation on using the "Additional classnames" or "Additional inline styles" fields on the Visual Mode form

You can try these:
Edit the relationship form, find and edit the shortcode of "second field in the relationship", add attribute class='hidden' in it, like this:
[cred-relationship-role class='hidden' ...]

and in section "CSS Editor", add below CSS codes:

.hidden{
display:none;
}

And test again.

More help:
https://toolset.com/documentation/post-relationships/selecting-parent-posts-using-forms-create-child-items/#creating-forms-when-a-parent-post-is-preselected
screenshot:
hidden link

#1209762

Your suggestion didn't work, Luo, but adding 'hidden' to the div class did:

<div class="form-group hidden">
<label>Students</label>
[cred-relationship-role role='child']
</div>

Many thanks 🙂

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