Jump to content
Announcing Achievements! ×

Community

Delete lang when is not filled


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...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy