Skip Navigation

[Resolved] Section Wise Submission of Content

This support ticket is created 6 years, 3 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 6 years, 3 months ago.

Assisted by: Nigel.

Author
Posts
#1109248

I have a long form with around 15 fields including few multiple paragraph fields. I am facing two problems with regard to User Experience.

a) Upon hitting submit, if there is an error, the form loads straight from the top of the page. Which makes it difficult for a user to know exactly why his/her form is not being submitted and where to locate the error.

b) Sometimes the submit button has to be pressed twice before the content goes through.

I therefore think, that a solution might be to have section wise submission of forms just like in google forms. Where in I divide the form into 4 sections and all fields of the section can be within the same screen view.

After completing one section, the data gets saved and people move to the next section. It will be a better user experience.

Is that possible? With the forms system we have?

Additional Question | Can I set a limit of how many words people can add in the company profile section (WYSIWYG FIELD)

I could share the links if this was converted to a private thread.

Thank You.

#1109308

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

There is a trick to creating multi-part forms, which is to create an initial short form (for section 1) which publishes the post, and then add edit forms for each subsequent section which you chain together.

So the initial form publishes the post with the first few fields, and the page reloads with a form to edit the same post, but this time showing the second set of fields, which when submitted reloads the page with a form to edit the same post with the third section of fields etc.

Each form should redirect to show the post, and in the template for single posts of that type you use conditional statements to handle whether the post itself should be displayed, or the next step in a chain of forms.

You manage that by virtue of the fact that if your form redirects to show the post on submission it adds a URL parameter that identifies the referring form, namely cred_referrer_form_id, so your content template would look something like this:

<!-- if coming from form ID = 94 show the next form in the chain -->
[wpv-conditional if="( '[wpv-search-term param='cred_referrer_form_id']' eq '94' )"]
[cred_form form='publish-thing-part-2']
[/wpv-conditional]

<!-- if post visited directly just show it -->
[wpv-conditional if="( '[wpv-search-term param='cred_referrer_form_id']' eq '' )"]
[wpv-post-body view_template="None"]
[/wpv-conditional]

To limit the number of characters in a WYSIWYG field, to do that while the data is being entered you could try a little JS such as that provided here: https://toolset.com/forums/topic/character-insertion-limit/#post-617668

Or you could add server-side validation using the cred_form_validate hook: https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate

#1109313

Wow. Thank you Nigel. I will put my head together and do this. My D Day is coming close and its great to see the site come alive. I will try this out and revert back with the results.

#1109345

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

No problem, let me just mark this as awaiting feedback from you so that it's not sitting in my queue.