Skip Navigation

[Resolved] Split: Additional form for new custom post types

This support ticket is created 6 years, 1 month 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
- 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/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by Dietrich 6 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#1128030

Hi,
thanks for your fast answer. I contact the the7 support, unfortunately they are not very helpful...

I have an additional question to the form at hidden link :
in the form there are (at the bottom) two links to other custom types ("Standort Addresse" and "Ansprechpartner"). The user can select one from the list, but how can he create a new entry in the list?
Is there a possibility to create a new "Standort Addresse" under this button where you can make a new entry in a second form (which opens up underneath) and select it?

#1128080

Hi Dietrich,

Thanks for writing back and sorry to learn that the support from the theme author isn't very helpful.

To add necessary changes/customization to the theme, you can consult a web developer. We have a list of certified consultants at:
hidden link

To allow visitors to add new entries for "Standort Addresse" and "Ansprechpartner", you can follow these steps:

1. Please create two new forms to add post type entries for each of these items.
( https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-creating-content/ )

2. At the bottom of the page with the new jobs forms, you can add the two forms like this:


<a href="#" id="link-form-1">Show form 1</a> | <a href="#" id="link-form-2">Show form 2</a> | <a href="#" id="link-form-reset">Close all</a>

<div id="new-entry-form-container-wrap" class="new-entry-form-container">
  <div id="new-entry-form-container-1" class="new-entry-form-container">
    [cred_form form="slug-of-form-1"]
  </div>
  <div id="new-entry-form-container-2" class="new-entry-form-container">
    [cred_form form="slug-of-form-2"]
  </div>
</div>

Note: replace "slug-of-form-1" & "slug-of-form-2" with the actual slugs of the newly created forms.

3. In the "CSS editor" below the content of your add new Jobs form, you can add following CSS to hide the new forms when the page loads:


.new-entry-form-container {
display: none;
}

4. In the "JS editor" below the content of add new jobs form, you can add following script to make new forms only appear, when a relevant link is clicked:


$(document).ready(

function(){
  $("#link-form-1").click(function (e) {
    e.preventDefault();
    $("#new-entry-form-container-1").show();
    $("#new-entry-form-container-wrap").show();
    $("#new-entry-form-container-2").hide();
  });
  $("#link-form-2").click(function (e) {
    e.preventDefault();
    $("#new-entry-form-container-2").show();
    $("#new-entry-form-container-wrap").show();
    $("#new-entry-form-container-1").hide();
  });
  $("#link-form-reset").click(function (e) {
    e.preventDefault();
    $("#new-entry-form-container-wrap").hide();
    $("#new-entry-form-container-1").hide();
    $("#new-entry-form-container-2").hide();
  });
}

);

I hope this helps! Please let me know if you need any further assistance.

regards,
Waqar

#1128985
Bildschirmfoto 2018-10-17 um 11.04.52.png

Hi,
thanks for the solution.
Unfortunately I can't include another form in the job form.
As you see on the screenshot it don't schows the newly created form "Ansprechpartner-formular".
Whats wrong?

#1129012

Hi Dietrich,

The shortcode to show forms ( e.g. [cred_form form="ansprechpartner-formular"] ) doesn't work, when added inside another form.

This is the reason, I suggested to add the HTML part (point 2 of my last message), into the page's content and not the form itself.

Please remove that HTML from the form ( screenshot: hidden link ) and add it in the content of the page where the old form is ( screenshot: hidden link ).

Important: While adding HTML code into the page, please make sure to keep the "Text" tab selected, as shown in the last screenshot.

#1129149

Thanks, that worked for me.