Search

I was wondering. Is it possible to use the custom fields fully with an Event? I mean, say this is a field I can use with an event:

<label>Voorstelling naam
    <input name="fields[locatie-theater]" type="text" />
</label>

The location field (what it is), is just one input text field.

When I look at the html that is used in the symphony backend, when I edit an existing entry with this field in it. It's actually a collection of fields, influenced by custom css and JavaScript:

<div id="field-54" class="field field-maplocation">
    <label class="coordinates">Marker Latitude/Longitude
       <input name="fields[locatie-theater][coordinates]" type="text" value="52.3670913199222, 4.89856201718749">
    </label>
    <label class="centre">Centre Latitude/Longitude
       <input name="fields[locatie-theater][centre]" type="text" value="52.367091319922245, 4.898562017187487">
    </label>
    <label class="zoom">Zoom Level
       <input name="fields[locatie-theater][zoom]" type="text" value="11">
    </label>
</div>

Is it possible to get this field in all it's glory to work in a event context? And I don't mean this field in particular, but more in a generic senese. Is it possible to use custom fields with all their functions with an event?

When I was still using ExpressionEngine, there is a module called Safecracker that does exactly what i'm after, I'm hoping there are alternatives for Symphony CMS :).

EDIT: Could it just be a matter of using the right js and css with the fields from the backend publish page?

I want to say what you're suggesting is possible, but could you clarify exactly what you're attempting to do with it?

Are you asking if you can, for example, individually update the 3 values, coordinates, centre and zoom?

If so I don't see why not, although I don't have experience with this extension. You also shouldn't need to fiddle with any CSS or JS to achieve what you're after either, assuming I'm understanding you correctly!

When you create the event how does it list the the 'available' fields in the examples provided?

I would expect that you can push values to them exactly as they appear above, so:

<input name="fields[locatie-theater][coordinates]" type="text"/>
<input name="fields[locatie-theater][centre]" type="text"/>
<input name="fields[locatie-theater][zoom]" type="text"/>

In the front end should populate them accordingly.

Hi Nathanhornby. Thanks for your response. This is not entirely what I mean. What I mean is a custom backend with a fully functional custom field. I have been trying this last week with the datetime field from hananils. It's going in the right direction.

I think what Sanity11 is after is a way to use the field in the backend on the frontend. So it looks, acts and functions the same way.

Strictly speaking, it's not possible as fields generally rely on styling and scripting provided by the Symphony backend to achieve their look and feel.

However, styles and scripts are just usual CSS and JS, so if you replicated the markup on the frontend and reference the correct CSS and JS, you may be able to get the backend field working on the frontend.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details