Digital experiences for all disciplines
New Landing › How can we help? › Cardinal › Integrating HTML form w/ datepicker/js scripts Cardingal theme
New Landing › How can we help? › Cardinal › Integrating HTML form w/ datepicker/js scripts Cardingal theme
- This topic has 14 replies, 2 voices, and was last updated 10 years by Rui Guerreiro – SUPPORT.
-
Posted in: Cardinal
-
November 6, 2014 at 7:14 am #126069
Hi, I have a question regarding integrating an HTML form I built out using this http://codecanyon.net/item/smart-forms/7254656 smartforms framework.
My client will have a booking system that this template will be used for the front end and I would love to be able to pull this same html template into the site so that the design and functionality matches up perfectly.
You can see my attempt on this page – http://proxiimity.com/allresort-wp/fleet/. I was able to get the form in terms of the design, imported into the page, but I am unable to get the datepicker feature to work. I tried to add the JS files needed for the datepicker into the cardinal functions file and I added the JS code that sits in the head of the html doc to the head section of header.php file, but this does not work and it actually creates some issues on the front-end of the site.
First, I assme I should be adding these files in the child theme and not the main Cardinal theme, correct? But I tried this and it didn’t seem to load up the scripts into the site, maybe I was going about it wrong.
Here is a link to the working form in action – http://proxiimity.com/booknow/
I guess the big question would be, is it possible to integrate this form into the site without having a conflict with the other scripts on the site as it is now? and if so, what would be the best way to go about it.
Thanks again for all your support!
Love Cardinal!!!
T
Attachments:
You must be logged in to view attached files.November 6, 2014 at 10:29 am #126136Hi,
You should do it in a child theme. The code should be similar to the one below.
Just need to replace my-custom-script by your desired script name and adjust the path to the js file.if ( ! function_exists( 'sf_custom_enqueue_scripts' ) ) { function sf_custom_enqueue_scripts() { wp_register_script( 'my-custom-script', SF_LOCAL_PATH . '/js/my-custom.js', 'jquery', null, true ); } } add_action( 'wp_enqueue_scripts', 'sf_custom_enqueue_scripts' );
Hope it helps.
-Rui
November 7, 2014 at 7:23 am #126362This reply has been marked as private.November 7, 2014 at 11:13 am #126439Hi,
You shouldn’t include jQuery because that is handled by WordPress already and if it’s loaded twice will create conflicts.
Regarding the additional script you can loaded it in the custom js option we have in the theme. You just don’t need to include the script tags.
<script type="text/javascript"> </script>
I’m just trying to point you in the right direction, because we can support customizations has you may understand.
-Rui
November 7, 2014 at 7:24 pm #126569This reply has been marked as private.November 7, 2014 at 7:28 pm #126573Hi,
the most clean solution is including the css inside the style.css of the child theme after the import of the style.css of the parent theme.
This way you don’t have problems with the updates.
-Rui
November 7, 2014 at 7:45 pm #126579This reply has been marked as private.November 7, 2014 at 8:08 pm #126583No problem.
-RuiNovember 13, 2014 at 6:41 am #127868This reply has been marked as private.November 13, 2014 at 4:05 pm #128100Hi,
Can you just provide me admin access so I can check?
Can’t promise anything because can’t spent much on this.-Rui
November 13, 2014 at 4:15 pm #128108This reply has been marked as private.November 13, 2014 at 4:18 pm #128110Can’t login with those credentials. can you check?
-RuiNovember 13, 2014 at 4:21 pm #128112This reply has been marked as private.November 13, 2014 at 4:25 pm #128114This reply has been marked as private.November 13, 2014 at 5:29 pm #128142Unfortunately I had no luck. I’m sorry, you will have to hire a developer to make that integration without errors or try other plugins. 🙁
-Rui
-
Posted in: Cardinal
You must be logged in and have valid license to reply to this topic.