0

I have a form that is a button to link to a product but for some reason when I add php to the form action it's breaking the block of code. I'm not sure what I am missing. It's a very simple block and I've checked and double checked everything above it and it's all working perfectly until I get to this piece.

Here is the block that is breaking

<form action="<?php echo get_permalink( get_option( 'pctg_wc_meal_choice_page') ); ?>" method="post">
        <input type="hidden" name="meal_plan" value="<?php echo $product->id; ?>" />
        <button type="submit" id="btn_load" class="btn btn-secondary" data-loaing-text="Loading...">Get Started</button>
      </form>

Right it's not recognizing that I've closed the " so the rest of the block of code doesn't work.

  • Breaking how? What does the generated HTML look like on the page? – Rup Jun 5 '19 at 14:51
1

Disregard the entire question. I've found my answer. I was missing a closing tag on the wrapping div. Go figure.

Not the answer you're looking for? Browse other questions tagged or ask your own question.