Appointments icon indicating copy to clipboard operation
Appointments copied to clipboard

Extra Fields (JSON Object) not working on new pages

Open thehecki opened this issue 9 months ago • 7 comments

After you fixed the issue #600 (thx, fast fix and works fine) there is a new bug: Existing Pages works fine, i can add extra fields on this, but when i create a new page and add the same code for the extra fields, the new published page show not one of the extra fields

testet with my code and your example code: { "tag": "textarea", "label": "Enter text", "placeholder": "placeholder text" }

https://github.com/SergeyMosin/Appointments/issues/600

Nextcloud Version: 31.0.5 (SNAP) Appointments Version: 2.4.5

  • testet on 2 different nextcloud instance

thehecki avatar Jun 12 '25 11:06 thehecki

I think you are missing [ and ] (square brackets) around your JSON object. It should look something like this:

[
  {
    "tag": "textarea",
    "label": "Enter text",
    "placeholder": "placeholder text"
  }
]

SergeyMosin avatar Jun 12 '25 12:06 SergeyMosin

I think you are missing [ and ] (square brackets) around your JSON object. It should look something like this:

[ { "tag": "textarea", "label": "Enter text", "placeholder": "placeholder text" } ]

No, i have used the brackets.

[
  {
    "tag": "input",
    "required": true,
    "label": "Your bla",
    "placeholder": "bla 123 321 bla",
    "type": "text"
  },
  {
    "tag": "select",
    "label": "Make your choice",
    "options": [
      "on site",
      "online",
      "phone",
      "other"
    ]
  },
  {
    "tag": "textarea",
    "label": "Address",
    "placeholder": "123"
  },
  {
    "tag": "textarea",
    "label": "Addionatal information",
    "placeholder": "123"
  }
]

AND testet with:

[
  {
    "tag": "textarea",
    "label": "Enter text",
    "placeholder": "placeholder text"
  }
]

thehecki avatar Jun 12 '25 12:06 thehecki

I cannot replicate this. Can you send me (sergey [at] srgdev.com) the URL of the page where it is not working.

SergeyMosin avatar Jun 12 '25 12:06 SergeyMosin

i have found the bug, the calender in this case was new and i havent add appointment slots in this calender. After delete the added appointments slots in the new calender, all was fine, the extra fields was there.

then i reproduce the effect with a new calender, i change the old calender to the new created calender and i become the same effect, they dont show the extra fields

i hope this helps, i can send you the links if you want, but i think you can reproduce it with a new calender

thehecki avatar Jun 12 '25 13:06 thehecki

I would love to add fields... can you send me the files and ideas? A drop choice is nice?

CSchaefer70 avatar Jul 31 '25 02:07 CSchaefer70

@CSchaefer70 Select/Dropdown example:

[
  {
    "tag": "select",
    "label": "Favorite transport",
    "options": [
      "Car",
      "Boat",
      "Bike",
      "Donkey",
      "Tank"
    ]
  }
]
Image Image

SergeyMosin avatar Jul 31 '25 17:07 SergeyMosin

Wow. I did not realize the Advance Forms section had this option. Thank you!!! I can make use of this feature.

CSchaefer70 avatar Aug 01 '25 19:08 CSchaefer70