• Resolved damdam_C

    (@damdam_c)


    hello,

    I am working with our tablepress
    we are a bed & breakfast ??

    I need to realise independance cells
    between your colums for ‘nights’ and ‘prices’

    How do I retrieve the value of the cell (eg C2 selected) in the
    cell D2)
    I have put the code C2 :

    <!– colums “nights” –>
    <select name=”options[foo]”>
    <option value=”1″ <?php selected( $options[‘foo’], 1 ); ?>>1</option>
    <option value=”2″ <?php selected( $options[‘foo’], 2 ); ?>>2</option>
    <option value=”3″ <?php selected( $options[‘foo’], 3 ); ?>>3</option>
    </select>

    I do not know if I’m clear ….
    Have a good day.
    damien.

    https://www.ads-software.com/plugins/tablepress/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi Damien,

    thanks for your question!

    So, you want to create a form, where the user can select the number of nights, and then you want to update the prices?
    That will only be possible on the frontend (where the table is shown), by using JavaScript code. You could for example use jQuery to retrieve the value and then calculate the new content for the cell.
    Making this in PHP or with Shortcodes is not possible though, as the form would need to be sent to the server, but then the table is not “run” again.

    Regards,
    Tobias

    Thread Starter damdam_C

    (@damdam_c)

    Hi Tobias,

    >So, you want to create a form, where the user can select the number >of nights, and then you want to update the prices?

    =>yes exactly we want to do.

    ok I will have a look to jQuery.
    thanks.
    Regards.
    damien.

    Thread Starter damdam_C

    (@damdam_c)

    Hi Tobias,

    Do you have an little example how to use jquery in wordpress to call DOM elements ?
    how do we call the table of tablepress ?

    Regards.
    damien.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ok, then jQuery will be your tool of choice, and this doesn’t really have that much to do with a table then. You could easily create this without the table, too. Thus, there’s no real “call a cell of TablePress”, but just reading some form elements.

    I therefore suggest to take a look at some jQuery tutorials where you learn basics about form interaction. See e.g. https://learn.jquery.com/

    Regards,
    Tobias

    Thread Starter damdam_C

    (@damdam_c)

    ok in fact for the moment, i don’t know how to do.

    i am still searching.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, it will require some programming, but there are plenty of ressources that can help you.

    Regards,
    Tobias

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘independance cells’ is closed to new replies.