Announcement

Collapse
No announcement yet.

Input field in a Grid ???

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Input field in a Grid ???

    Hello,

    How to add an input field into a grid application ?

    ex : on displayed record line , adding a input of a value

    Thanks

  • #2
    create a virtual field (virtual input).

    Comment


    • #3
      Nope, that doesn't work. You cannot add edit fields to a grid. If you need a grid with edit fields you need to create a form of type editable grid (view). Here you can add a manual field at fields -> newfield.
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development
      www.scriptcase.eu / www.scriptcase.nl

      Comment


      • #4
        There is a way to meke something like this, but it is not native and i am not sure it will work for every purpose:

        You can create a virtual text field, I created one called "teste". And in the onRecord Event I did this:

        {teste} = "
        <form method='POST'>
        <input type='text' name='".{id}."_field' />
        <input type='hidden' name='post_submit_form' value='".{id}."' />
        <input type='submit' />
        </form>
        ";

        This code will create an input field with a submit button for every record. If i click the submit button it will reload the page and send the data via POST. On the onScriptInit event i have this:

        if (isset($_POST['post_submit_form']) && !empty($_POST['post_submit_form']))
        {
        if (isset($_POST[$_POST['post_submit_form'].'_field']) && !empty($_POST[$_POST['post_submit_form'].'_field']))
        {
        $value = $_POST[$_POST['post_submit_form'].'_field'];
        $id = $_POST['post_submit_form'];
        /* YOUR CODE GOES HERE */

        }
        }


        This will make me able to Use the value submited with the $value variable and the ID of the row affected with the $id.

        Hope this can help you.
        http://www.frameworkphp.net/php/wp-c.../11/Ubarsc.jpg

        Comment


        • #5
          Thanks !!!

          I will try your code Enrique

          Best regards

          Comment

          Working...
          X