Skip Navigation

[Resolved] Modal display of post form parent selection not working

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

Problem:

isplay a post form to create a post, in a Bootstrap modal,
the dropdown select was limited to 10 entries and the search facility does not function in Firefox browser.

Solution:

It is the same probelm as the select2 document:
https://select2.org/troubleshooting/common-problems

And can be fixed with JS codes:

jQuery(document).on( 'cred_form_ready', function($) {  
        // ALL YOUR CRED form JS code goes here. Add your JS code here
    jQuery.fn.modal.Constructor.prototype.enforceFocus = function() {}
});

Relevant Documentation:

This support ticket is created 4 years, 11 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
- 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 24 replies, has 3 voices.

Last updated by tony 4 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1424505
teesdale-01.jpg

Hi Luo

The video does not show the modal extending down the screen so that you need to scroll down to see the model footer.

Please can you have another look - just zoom your screen so that it does not fit like the example image.

If the modal is contained within the screen it works fine. If not contained the select choice is limited to the 10 displayed items.

Many thanks
Tony

PS I tested my other website and it has the same problem. Both are on the same server under different accounts.

#1425397

I have tested it again, but can not see the same problem as your description:
- scroll down to see the model footer.
- zoom your screen so that it does not fit like the example image
see the new video capture:
hidden link
File:
testpage – Teesdale Local - Mozilla Firefox 2019-12-26 10-45-55

if you need more assistance for it, please provide a test site with the same problem. thanks

#1425789

Hi Luo

The modal is still contained within the screen depth in the video.

Please can you add 5 or 6 extra fields so that the form is very long and try again.

Sorry but I am not sure we are looking at the same thing.

If that works. Try the live website with the same login credentials - it is only in test mode at present and so feel free to alter things.

KInd regards
Tony

#1425831

I was using the duplicator package you provided above, did not add any more fields in it.
https://toolset.com/forums/topic/modal-display-of-post-form-parent-selection-not-working/#post-1422575

I have tried it again, with below steps, please correct me if there is any missing:
1) Edit post form "Add Org-Venue TEST", add 10 more fields into the form content
2) Test it in front-end:
hidden link
3) Resize the browser window to small size(414 *736)
4) test it in field "Places Organisation-Venues", it works just fine

So please provide the duplicator package with the same problem, also provide the detail steps to reproduce problem. thanks

#1425865

Hi Luo and sorry about this - it is looking like a local problem here.

If you log into our live site hidden link using the same login details as in the duplicator.

Then go to test page as before and see if the form is working for you in Firefox. The form is long and so there is no need to change the screen size. All above in Firefox.

Many thanks
Tony

#1425889

Thanks for the details, you are right, it is the same probelm as the select2 document:
hidden link

I have done below modifications in your website:
1) Edit the post form "Add Org-Venue TEST":
in JS editor, add below JS codes:

jQuery(document).on( 'cred_form_ready', function($) {  
        // ALL YOUR CRED form JS code goes here. Add your JS code here
    jQuery.fn.modal.Constructor.prototype.enforceFocus = function() {}
});

2) Test it in front-end:
hidden link
click button "Add Organisation-Venue"

I can see that select2 field works fine. can you confirm it? thanks

#1425915

Hi Luo

Many thanks - the fix has worked fine so we got there inthe end.

I do appreciate your support and willingness to see things through to a good conclusion.

Kind regards
Tony

#1425919

What a star! Your support is much appreciated.
Tony

#1479701

Note that in Bootstrap 4 modals, the enforceFocus function has an underscore prefix:

jQuery.fn.modal.Constructor.prototype._enforceFocus = function() {};
#1479753

Thank you Christian

It is good to know the code is different for bootstrap 4.

I am using bootstrap 3 so all is well.

Kind regards
Tony