All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

How do I identify the Low Events id in a Channel Form fieldtype?

Chris 8 Jan 2018 01:19 question, complete

I see that this question might have been addressed but I don't understand the syntax for creating the proper id for a low event in a channel form.

When I submit the channel form none, of the updated low event inputs are updated. Other input types in my channel form are updated so I'm confident the channel form is working correctly.

Here is my code:
{exp:low_events:entries channel="fundraisers" entry_id="{segment_3}"}

to

{/exp:low_events:entries}

Replies

  1. Low 8 Jan 2018 08:41

    Note that if you're just outputting one entry/event, you might as well just use the Channel:entries tag. The low_events:entries tag is just a wrapper do generate entries within a given date range.

    That said, if you use the standard syntax for EE fields in a Channel Form (eg. {field:event_dates}, where the field name is "event_dates"), then it should generate all the necessary fields for you, including the correct names (which look like name="event_dates[start_date]" and so on).

    You do not need an ID generated by Low Events.

  2. Chris 9 Jan 2018 01:46

    Yes, simply including {field:event_date_and_time} display the low events fields. However if I want to include any parameter such as:
    {field:event_date_and_time class="form-control"} the inputs do not display, showing only the field tag in my form.
    It seems adding any parameter to the field tag prevents the inputs from displaying.

  3. Low 9 Jan 2018 07:45

    That's the way EE works, really. You can wrap a div around the field...

  4. Chris 9 Jan 2018 11:33

    If I add some Bootstrap css around the low events fieldtype like:
    div class="form-group form-inline">
    div class="form-control">
    {field:event_date_and_time}
    /div>
    /div>

    The field is not formatted. Please see attached screenshot

  5. Low 9 Jan 2018 11:38

    To be honest, this isn't a Low Events issue. It's a general styling issue because you're using Bootstrap.

    You can look at the HTML that is generated for the Low Events field and hard-code it in the template, but you'll have to use your own datepicker/timepicker etc. This isn't something I can support.

  6. Chris 9 Jan 2018 14:43

    Am I to understand there is no way to apply a style to the input elements, other than hardcoding the Low Events field add-on code.

  7. Low 9 Jan 2018 14:51

    You can override the styles by targeting classes and IDs that Low Events adds to its fields. View the source to see which ones.

    I'm guessing the same is true for Grid or Relationship fields, or even RTE fields.