dokuwiki-plugin-bureaucracy icon indicating copy to clipboard operation
dokuwiki-plugin-bureaucracy copied to clipboard

Bureaucracy dependencies with struct_field and hidden-field fail

Open LukasHirsch opened this issue 4 years ago • 2 comments

Hi! I'm using the bureaucracy plugin in combination with the struct plugin. When I use a select-field in the first fieldset to show different input options, the options show as expected. However, the inputs from struct_field and hidden can only be used in a template when they are part of the first fieldset. Once I try using the input of a struct_field or hidden from the second or third fieldset (that depends on the select in the first fieldset) the placeholders are ignored.

<form>
action template templates:user users:@@scheme1.field_A@@:@@switcher@@:@@scheme1.field_B@@
Fieldset "Main Fieldset"
select "Group" "Group 1|Group 2"
struct_field "scheme1.field_A" "=correct replacement"

Fieldset "Group 1" "Group" "Group 1"
textbox "Name" "=My name"
hidden "switcher" "=group1"
struct_field "scheme1.field_B" "=ignored"

Fieldset "Group 2" "Group" "Group 2"
hidden "switcher" "=group2"
struct_field "scheme1.field_B" "=ignored"

Fieldset
Submit
</form>

In the above example the following replacements will happen:

  • @@scheme1.field_A@@ ->"correct replacement"
  • @@switcher@@ -> "switcher" (not "group1" or "group2")
  • @@scheme1.field_B@@ -> "scheme1.field_B" (not "ignored")

With a normal textbox-field everything works, no matter if the textbox is in the first or second/third fieldset.

So I guess the problem is somewhere in the code for the different types of fields. Maybe someone can point me into some direction so I can have a look and see if I can fix this?

Thanks for your help!

Versions Wiki: Hogfather 2020-07-29 Bureaucracy Plugin: 2020-09-28 Struct Plugin: 2020-08-26

LukasHirsch avatar Oct 02 '20 09:10 LukasHirsch

I think it is similar to this one: https://forum.dokuwiki.org/d/18552-bureaucracy-und-struct (german)

LMS235 avatar Dec 02 '20 12:12 LMS235

it seems working with select fields and struct does not work very well.

I cant' figure out a proper way to fill the selected value of a select field into a struct field.

For the last fieldset it works for all previous fieldsets it doesn't.

runout-at avatar Nov 27 '22 23:11 runout-at