• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Web apps dateTime field: value can't be deleted

Contributor ,
Oct 11, 2016 Oct 11, 2016

Copy link to clipboard

Copied

Hi,

I've noticed that a web apps field of type dateType it's value can't be deleted when a date has been selected through the pop-up.

You can only alter the date. This field doesn't behave like other field types when a value is added that you can delete it's content with back-space or the delete key.

Could this be fixed in the near future?

thanks,

kind regards,

Carla

TOPICS
Developer

Views

397

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 11, 2016 Oct 11, 2016

Copy link to clipboard

Copied

Hi Carla, You mean in terms of the webform?

Very much feel free to scrap and remove and not use the BC default one. There are plenty of mobile friend jquery ones that are lightweight and very easy to use.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 11, 2016 Oct 11, 2016

Copy link to clipboard

Copied

Hi Liam, I mean the field in a web app. When you create a web app you can choose different field types, like number, textstring etc. The dateTime field is very handy but if it only it's content could be deleted when you make a mistake when filling in a date as a user. Fields with the type textstring are easily be corrected.

I hope that it explains better what I mean.

thanks for your "rapid" reply

Carla

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 03, 2016 Nov 03, 2016

Copy link to clipboard

Copied

Some one asked me a question if I had a solution for this. I've a workaround, not ideal. But for the time being it works. You can of course fine tune things later on with liquid to trigger what an user could possibly have typed in. Like special characters.

If you are an expert on Javascript it's your party.

Workaround:

​

As an administrator you can delete the field with its values.

​If the to be deleted field has a lot of web app items, I would export all data first in CSV-format.

​Delete the field.

​Add the new field with the same name.

​Export the data again, to see what ID is given to the new field and its name.

​Upload the early exported CSV with the new name and ID added/altered to it.

​

​So I added a new date field with the type "text string" and with the same name.

​ You only have to instruct your client how to fill in the date format.

​I asked them to type the date as follows: 29-10-2016

​In my html-template I added a liquid statement like this:

​{% if this.["Date available"] > "0" -%}                        <div class="property-details__table">

                            <p class="property-details__question"> available per</p>

                           <p class="property-details__answer"><span lang="en">{{this.{["Date available"] | date: "dd " }} {{MMM}}

  {{this.{["Date available"] | date: " yyyy"}}</span> </p>

                        </div>

                        {% endif %}

​The tag span lang="en" is only needed when the default language(=culture) of your site is not-English. In my case Dutch.

​

​

​

​I hope this will help. Any other suggestions are welcome.

​Kind regards,

​Carla

​

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 04, 2016 Nov 04, 2016

Copy link to clipboard

Copied

LATEST

update: Nov 4th

I've an update on the code, which was incomplete. Sorry for that.

​If you have a multilingual site (like in my case Dutch and English) you have to translate some words first.

​The culture of my site is in Dutch. So I have to convert that. I've only converted(translated) the words which are different from English.

If you're designing the website in the language of  the site's culture then you only need (can) to use the liquids date | time filter without any assigns and capture which I used in this example

​

​{% assign MM = {{this.{["Date available"] | date: "MM"}} %}                     

​{% assign MO = {{this.{["Date available"] | date: "MMM"}} %}

{% capture MMM -%}

  {% case MM %}

{% when '03' %}mar

{% when '05' %}may

{% when '10' %}oct

  {% else %}

  {{ MO }}             

{% endcase %}

{% endcapture -%}

     {% if this.["Date available"] > "0" -%}

        <div class="property-details__table">

            <p class="property-details__question"> available per</p>

            <p class="property-details__answer"><span lang="en">{{this.{["Date available"] | date: "dd " }} {{MMM}}

                 {{this.{["Date available"] | date: " yyyy"}}</span> </p>

         </div>

     {% endif %}

​

​Kind regards, Carla

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines