Jump to content

Delete lang when is not filled


aXenDev
 Share

Recommended Posts

Hi,

I'm trying change column with lang keys in DB when is not filled then column should be null, but it isn't.

It is not filled:
image.png.3e55a331a7cf9563e9f0b6038517124c.png

In database when I save node:
image.png.b9b381f3ddc3ca9c1c8765fb89571082.png

 

I have this code:

  /**
   * [Node] Format form values from add/edit form for save
   *
   * @param	array	$values	Values from the form
   * @return	array
   */
  public function formatFormValues($values)
  {
    if (!$values['axenserverlist_debug_text']) {
      $values["axenserverlist_debug_text"] = NULL;
    }

    return $values;
  }

but it doesn't work for me, because always return string with comma.

How can I change the code when no one has typed anything in input, then returns null in DB?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...