Jump to content

Custom Field with space in the name


Recommended Posts

I have a custom field called "Server Name". In my $params, it shows up as $params['customfields']['Server Name"]

 

I need to put it on a template. I was expecting to be able to do {$customfields.Server Name} but I'm worried about the space in the servername.

 

What's the correct way to reference this?

 

Thanks,

 

Ed G

Link to comment
Share on other sites

I don't think you can reference an array variable with a space in it directly with smarty but you can create a variable that you can use to reference the name with the space in it.

 
{assign var="mykey" value="Server Name"}
{$customfields.$mykey}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated