• I’m building a flashcards site comprised of posts (single.php). The flashcards are initially in Latin. When you click on them you see the English translation.

    I’d like to be able to have a form before the flashcards set which would allow the user, by clicking a checkbox and clicking save, to be able to set the initial card to English (and vice versa).

    Something like:

    <?php
    <form>
    checkbox checked Latin / checkbox English
    input type = submit (Save)
    </form>
    
    if user has checked and saved English:
      include flashcards-english-first .php
      uninclude flashcards-latin-first.php
    
    if after this user has checked and saved Latin:
      include flashcards-latin-first.php
      uninclude flashcards-english-first.php
    
    else if user has not interacted with the form
      include flashcards-latin-first.php (default)
    ?>

    Hope the logic of this pseudo-code makes sense. I really want to know if it makes sense inside of WordPress. Could anyone englighten me? Not expecting a coded solution or anything maybe a shove in the right direction 🙂

    • This topic was modified 8 years, 3 months ago by nadgepress.
    • This topic was modified 8 years, 3 months ago by nadgepress.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Would suggest that you do all of this in javascript. In the same page start with the control and display, also load all the English + Latin phrases, then within the page have the javascript run the slideshow.

    Thread Starter nadgepress

    (@nadgepress)

    Hi thanks. Think that’s the way to go, yes!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding form to post that after saving will load an include.php file’ is closed to new replies.