Support » Plugin: TablePress » inserting $_POST value at the end of all words in first column cells in the tabl

  • Resolved nmm4829

    (@nmm4829)


    Hi
    in my WordPress website I’ve created an html form that receives the phrase which user enters into input field and i need when user clicks on start button, the user’s entered value ($_POST value) be added at the end of all words which are located in first column cells and the combination be displayed on the table.
    for example currently table’s first column cells are predefined like this :
    japan
    china
    italy

    and when user enters for examle the word “foo” and clicks on start button, the fist column of the table be like this:
    japanfoo
    chinafoo
    italyfoo

    would you please guide me in which exact file of this plugin i must insert my php and html codes?
    also if possible please guide me about required code.

    thank in advance

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Unfortunately, there is no easy solution to this. TablePress does not have an integration with form fields. You will need to check the PHP code of TablePress, e.g. in the model-table.php file, to find how tables can be loaded to a two-dimensional array. Then, you need to modify that array and save it again.

    Regards,
    Tobias

    Thread Starter nmm4829

    (@nmm4829)

    Hi Mr Tobias,
    thank you very much for your reply.
    i had a look at model-table.php file and there was about 1322 lines of code and many occurrences of array.
    Since I’m not a php expert now, I would be grateful if you could guide me in which section of model-table.php i must make required changes so that i start my efforts.

    Regards

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    you should not modify anything in the model-table.php file! The file does however contain the definitions of the PHP functions that you could use in your own plugin to handle this.
    Unfortunately, as this is rather complex, I can not do this work for you, sorry.

    Regards,
    Tobias

    Thread Starter nmm4829

    (@nmm4829)

    I got it
    Thanks for your guides
    best regards

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘inserting $_POST value at the end of all words in first column cells in the tabl’ is closed to new replies.