what would be a good example of a php dynamic code to display contents of textarea?

ok, guys this one is tricky at least for me. I have been given a template called page-warranty-registration.php and in this area towards the end:

            <option value="10">10</option>
              <option value="9">9</option>
              <option value="8">8</option>
              <option value="7">7</option>
              <option value="6">6</option>
              <option value="5">5</option>
              <option value="4">4</option>
              <option value="3">3</option>
              <option value="2">2</option>
              <option value="1">1</option>
              <option value="0">0</option>
            </select>
          </fieldset>
          <fieldset>
            <div style="float: left; margin-right: 10px;">
              <input type="checkbox" name="share-permission">
            </div>
            <label style="display: inline;" for="share-permission">I do not want my comments/feedback shared</label>
          </fieldset>
          <fieldset class="form-confirmation">
            <div style="float: left; margin-right: 10px;">
              <input type="checkbox" name="document-confirmation" required>
            </div>
            <label style="display: inline;" for="document-confirmation">I have read and acknowledge receipt of the Warranty, Fiberglass Pool Care Guide, and all APSP Safety Documents. <em style="font-weight: 400;">(If you have not reviewed the documents click <a href="#warranty-documents">here</a>)</em><label/><br/>
            <label for="fullname">Full Name:</label>
            <input type="text" name="fullname" required>
            <em style="font-weight: 400; font-size: 14px;">(By entering your full name here, you are signing this registration electronically. You agree your electronic signature is the legal equivalent of your manual signature on this registration.)</em><br/>
            <br/>
            <label for="signature-date">Date:</label><br/>
            <input type="date" name="signature-date" required>
            <br/>
          </fieldset>
          <fieldset>
            <input onclick="formSubmit()" type="submit" value="Submit" class="button button-yellow">
          </fieldset>
        </form>


      <a href="#page-top" class="scroll-button"><img src="<?php bloginfo( 'template_directory' ); ?>/img/white-arrow-up.svg"></a>
    </div>
  </main>
</div>

<?php get_footer(); ?>

I need to code something dynamic from two different wordpress pages via dashboard. That is, there are two different pages created on Pages in dashboard, one called standard and one called fpa for simplicity sake. I am assuming both are rendered dynamically using the page-warranty-registration.php.

Now I need to code a snippet that will render two different codes for each page. Let me unpack that. There is a textarea created with acf pro for each page. In that textarea will be a script that looks like this:

<script type="text/javascript">
   var __ss_noform = __ss_noform || [];
   __ss_noform.push(['baseURI', 'https://app-3QN76YGDSU.marketingautomation.services/webforms/receivePostback/MzawMDE1sTA3BgA/']);
   __ss_noform.push(['endpoint', 'eb954452-79ae-44e2-b1d2-ecf25f4fa285']);
</script>
<script type="text/javascript" src="https://koi-3QN76YGDSU.marketingautomation.services/client/noform.js?ver=1.24" ></script>

this will be added in the textarea via dashboard, but the script will be slightly different for the standard page and the fpa page.

I believe I can code something in the page-warranty-registration.php file that will allow for the dynamic rendering of the code in the textarea of each individual page. Does this make sense? If so, how would that code look like? Is it the same as dynamically coding a blog?

If not, what am I missing?

Read more here: what would be a good example of a php dynamic code to display contents of textarea?

Leave a Reply

Your email address will not be published. Required fields are marked *