New Landing How can we help? Cardinal Integrating HTML form w/ datepicker/js scripts Cardingal theme

Viewing 15 posts - 1 through 15 (of 15 total)
  • Posted in: Cardinal
  • #126069
    brooklynkid
    Member
    Post count: 37

    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.
    #126136
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    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

    #126362
    brooklynkid
    Member
    Post count: 37
    This reply has been marked as private.
    #126439
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    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

    #126569
    brooklynkid
    Member
    Post count: 37
    This reply has been marked as private.
    #126573
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    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

    #126579
    brooklynkid
    Member
    Post count: 37
    This reply has been marked as private.
    #126583
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    No problem.
    -Rui

    #127868
    brooklynkid
    Member
    Post count: 37
    This reply has been marked as private.
    #128100
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Can you just provide me admin access so I can check?
    Can’t promise anything because can’t spent much on this.

    -Rui

    #128108
    brooklynkid
    Member
    Post count: 37
    This reply has been marked as private.
    #128110
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Can’t login with those credentials. can you check?
    -Rui

    #128112
    brooklynkid
    Member
    Post count: 37
    This reply has been marked as private.
    #128114
    brooklynkid
    Member
    Post count: 37
    This reply has been marked as private.
    #128142
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Unfortunately 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

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register