Announcement

Collapse
No announcement yet.

PHP method output is not displaying in form field

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

  • PHP method output is not displaying in form field

    Hello Guys,

    I am working on a form application and have a label field in which I have to display custom html that I written in a PHP function. The field is of label data type and have name as 'data'. A new PHP method is created in Programming section having a HTML code. When I run the form, the HTML code displaying before header of form starts.

    PHP Code:
    A PHP function test()
    ===============
    echo 
    "<div>This is div for testing</div>"
    PHP Code:
    onLoad Event of form
    ================
    {
    data} = test(); 
    This is the what I did, which way is it better to do?

    --
    Milind Wakale

  • #2
    Yes, echo is just echoing the data. It's a php statement which pushes the text into the io channel in stead of filling your scriptcase variable. So it should be something like:

    Code:
    function test()
    {
      $r="<div>This is div for testing</div>"; 
      return $r;
    }
    
    onLoad Event of form
    ================
    {data} = test();
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Thanks, this is working perfectly.

      Comment

      Working...
      X