I am receiving this error:
Uncaught SyntaxError: Unexpected token <
which in turn is causing this error:
Uncaught ReferenceError: nfForms is not defined
at n.initialize (front-end.js:1)
at n.s.Object (front-end-deps.js:20)
at new n (backbone.min.js:1)
at n.initialize (front-end.js:2)
at n.s.Object (front-end-deps.js:20)
at new n (backbone.min.js:1)
at n.initialize (front-end.js:3)
at n.s.Object (front-end-deps.js:20)
at n.constructor (front-end-deps.js:21)
at new n (backbone.min.js:1)
but I cannot find the "<" that is causing the issue. I am created my own landing page template for a plug in called Inbound Pro on wordpress. I have checked my code, the source code, and the file that says the issue is on but I cannot find the "<" that is causing the problem. Am I crazy or is their a bigger issue at play here?
https://idsource.com/go/general-quote-page/
**EDIT - Further info: I forgot to mention that the main issue that I am having because of this error is that the form in the blue section won't load. I'm using the Ninja Forms plugin for my forms and one of the errors above states that "nfForms is not defined".
**EDIT - html for page:
<?php
/* Landing Page Boiler Plate */
$key = lp_get_parent_directory(dirname(__FILE__));
$path = LANDINGPAGES_UPLOADS_URLPATH ."$key/";
$url = plugins_url();
/* Define Landing Pages's custom pre-load hook for 3rd party plugin integration */
do_action('lp_init');
/* Load $post data and start normal WordPress Loop */
if (have_posts()) : while (have_posts()) : the_post();
$id = get_the_ID();
$title = get_the_title($id);
$content = lp_get_value($post, $key, 'main-content');
$conversion_area = lp_get_value($post, $key, 'conversion-area-content');
$sharetext = lp_get_value($post, $key, 'sharetext' );
$share_link = lp_get_value($post, $key, 'shareurl' );
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title><?php wp_title(); ?></title>
<meta name="viewport" content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width">
<?php wp_head(); // Load Regular WP Head
do_action('lp_head'); // Load Custom Landing Page Specific Header Items
?>
<link rel="stylesheet" href="<?php echo $path;?>lp.css" type="text/css">
<?php if ($share_link != ""){
$share_link = $share_link;
} else {
$share_link = get_permalink( $id );
} ?>
</head>
<body>
<header>
<div class="page_center large">
<?php $logo = get_field('logo');
if( !empty($logo) ):
?>
<img src="<?php echo $logo['url']; ?>" alt="<?php echo $logo['alt']; ?>">
<?php endif; ?>
</div>
</header>
<section class="lp_banner">
<div class="page_center large">
<?php the_field('banner_content'); ?>
</div>
<div class="page_center large thirds">
<?php
// check if the repeater field has rows of data
if( have_rows('banner_repeater') ):
// loop through the rows of data
while ( have_rows('banner_repeater') ) : the_row();
?>
<div class="third">
<?php $image = get_sub_field('repeater_image');
if( !empty($image) ):
?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>">
<?php endif; ?>
<span><?php the_sub_field('repeater_text'); ?></span>
</div>
<?php
endwhile;
else :
// no rows found
endif;
?>
</div>
</section>
<section class="lp_form">
<div class="page_center">
<?php the_field('quote_section_content'); ?>
<div class="form_wrap">
<?php the_field('quote_section_form'); ?>
</div>
</div>
</section>
<section class="designer">
<div class="page_center large">
<div class="left">
<?php the_field('designer_section_text'); ?>
</div>
<div class="right">
<div class="page_center">
<?php $desImage = get_field('designer_section_image');
if( !empty($desImage) ):
?>
<img src="<?php echo $desImage['url']; ?>" alt="<?php echo $desImage['alt']; ?>">
<?php endif; ?>
</div>
</div>
</div>
</section>
<?php break;
endwhile; endif; // End wordpress loop
?>
<footer>
<?php
do_action('wp_footer');
do_action('lp_footer');
?>
</footer>
</body>
</html>
` comes from the result of `the_field('quote_section_form');` - what is it?
– Alex K. Apr 07 '17 at 14:44tags. This isn't the case though...
– JSum Apr 07 '17 at 14:48