- This topic has 3 replies, 2 voices, and was last updated 5 years, 2 months ago by
johnvanham.
-
AuthorPosts
-
-
November 7, 2016 at 12:35 pm #7491
johnvanhamParticipantHello,
I am attempting to embed a Piklist form in an admin page, the same way as it is done on the demo add-on where the reading-settings form is embeded in the reading-settings page.
My WordPress plugin is named ‘ter-europe’ so I am calling it like this:
piklist('form', array( 'form' => 'standard-check', 'add_on' => 'ter-europe' ));Nothing is being output though and there are no errors. I’m not sure what I’m missing. This same form loads fine on the front-end using the shortcode:
[piklist_form form="standard-check" add_on="ter-europe"]What am I doing wrong?
Thanks!
-
November 7, 2016 at 12:54 pm #7492
johnvanhamParticipantTurns out it is because I’m using Bootstrap 3 for various other parts of the backend. The Piklist form has a ‘hidden’ class which bootstrap hides. So it was there, just hidden!
Is there a way to prevent this from happening?
-
November 14, 2016 at 1:56 pm #7535
JasonKeymasterHi @johnvanham!
So you’re adding Bootstrap to the whole of the admin-side? Not sure I’d recommend doing that as it could have unexpected results down the line with WordPress since it’s an entire CSS framework (assuming itself to be the threshold), whereas Piklist is extending the WP admin-side styles. You could try fixing it yourself by adding another stylesheet that more acutely reverses Bootstraps hiding styles for Piklist forms, but I can’t guarantee that won’t create new issues elsewhere.
Hope this helps! 🙂
-
December 1, 2016 at 8:32 am #7598
johnvanhamParticipantYes that’s right, and no issues were experienced with using Bootstrap on the admin-side until I tried to use the Piklist form on the admin-side as well.
I’ve worked around it by only queueing up Bootstrap when I need it which is not when the Piklist form is in use. And this also avoids it loading for most of the admin area of WordPress as well.
I’ve used Datatables with the Bootstrap theme for listing data which comes from a historical data structure, one such table has currently about 60,000 records – all loaded with paging via ajax, with column ordering and searching which Datatables handles beautifully and really quickly. Obviously we’ve not used Piklist for the data handling but we are using Piklist for fast development of the forms used across the site. We’re using a custom scope to manipulate the data since none of the data is stored using WordPress’s data structure. WordPress is acting as the CMS for the rest of the site besides the specific business logic our client needs.
So on the frontend, Piklist is used for submitting data using various forms including customer data which is then sent to a payment gateway. On the admin-side, the data is shown via Datatables then when a record is selected the data is loaded into the same Piklist form (with some extra fields and options available to the admin).
We would have probably used Piklist in the standard way if it hadn’t been for this client having had a previous website with a custom data structure.
It’s all working well, I was just thrown by the forms not displaying correctly on the admin-side to start with.
Thanks for replying! 🙂
-
-
AuthorPosts
- You must be logged in to reply to this topic.