Search

Hi folks,

i am currently trying to wrap my head around a problem and was wondering if there maybe was a solution already. The task is to append fields for text input to a section based on the entries of another section.

So i have the following setup:

Section A: Product
Every product entry features some metadata directly and implements several rich content from other sections.

Section B: Shop
A list of shops with name, contact person, metadata.

so what i would like to happen is having a text input "shop id $shopname" appear in each entry of section A when a new shop entry in section B is created.

any insights are greatly appreciated :)
daniel

I think this may be relevant: "Templated" Publish Tabs

I think this may be relevant: "Templated" Publish Tabs

Thanks for the input oliver. That is certainly something i am also looking into. Need a feature like that for several projects right now.

But this is not what i am after here. I am not trying to show / hide existing fields based on the state of another field. I need to create fields dynamically in a given section based on the entries of another section.

as i dont think there is a solution for this task - and i dont even know if this would be the right way to do it - maybe someone with a bit more insights on the inner workings of symphony would care to chime in :) so basically

  • is something like that possible at all
  • are there other solutions to get something like that working

i'd like to talk about it :)

cheers,
daniel

so what i would like to happen is having a text input "shop id $shopname" appear in each entry of section A when a new shop entry in section B is created.

I don't understand why you just don't have the field there all the time. What benefit is it to append it at different times?

because i dont know yet what entries (shops) will be in the other section. but i do know that i probably will need a field holding an id specific to that shop for each product entry.

sure, i could just create the field in the product section after a new shop has been entered in the other but i would like to make this as simple as possible for content management. but then again, i would probably habe to edit the output templates once the field has been added or go with generic namings for these fields.

come to think of it, not a problem at all. naming the fields as id_SHOPNAME whith the shopname from the shops entry and the xslt pastes these together. but generating fields in sections dynamically seems not to be trivial so maybe there is another solution.

Have you considered using the HTML panel field? With that, you can show as many text input fields as you like on your section page. The problem is you can store just a single value, so you would need to serialize your data somehow and unserialize it afterwords. This sounds complex but it all comes down to write a few lines of javascript to concatenate the text inputs values with some kind of character (let's say a comma) on form.submit and you should be good to go.

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