No announcement yet.

php-code as text

  • Filter
  • Time
  • Show
Clear All
new posts

  • php-code as text


    I have the following text in a DB field (Type longtext)

    PHP Code:
    if ( isset( $_GET['COLOR'] ) ) {
    $_GET['COLOR'] . '.php' );
    <form method="get">
       <select name="COLOR">
          <option value="red">red</option>
          <option value="blue">blue</option>
       <input type="submit">
    after I save the "text" (php code) I cannot edit anymore since the php is execute. How can i prevent this?

    I tried to replace "<" and ">" with "&lt;" and "&gt;". but this workarround does not work

    Any other hints for me?
    thanks rob

  • #2
    Are you editing the field in a form or a grid app?

    If a grid app, then the field in the app that maps to that DB field, if a text field, has the option on it's settings of: Show HTML content - Yes or No.

    If you choose Yes, then it does not interpret that field, i.e. tagging is ignored and just displayed.

    If it's a form, that option does not exist so I'm not sure what you can do I'm afraid. Perhaps show it on a form as an unchangeable "label" field, and have a button to open it in a one record grid to allow it to be edited?


    • #3
      Originally posted by adz1111 View Post
      Are you editing the field in a form or a grid app?
      Thanks for the fast answere - unfortunately it is a form ....
      is there any way to get an other editor? one i can switch beetween html code and text ...

      thanks rob


      • #4
        Well - you could use type of "HTML Editor" instead of "Text", no?


        • #5
          well actually is the field set to "HTML Editor"- i will set it to text an give it a try, but .....

          YES there is a change when I go "back" to text an yes I then can past the code - but I cannot make any layout stuff so ist dos not make sense

          I found the following article

          i did

          1) To use the new HTML editor template you will need to enable the use of the new toolbar, to do so, you have to open your form, on the left side you will find the Settings menu and then you will have to set as ‘YES’ the option ‘Use a template from the HTML Editor’,


          2) once that step is done the new options are going to be available inside the HTML Editor field settings.

          ??? i cannot see any changes

          cu rob
          Last edited by mITSM; 09-27-2015, 01:26 PM.


          • #6
            Found it! it is under "Fields" not "edit Fields"
            Last edited by mITSM; 09-27-2015, 01:45 PM.


            • #7

              if I use “<&#127;” instead of “<” it works !!! - withe the new TinyMCE editor -
              Last edited by mITSM; 10-01-2015, 05:53 AM.