Jump to content

Search the Community

Showing results for tags 'fieldsetpage'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 5 results

  1. Hi guys, in a website with a lot of fieldsetpages I want to show in this case accordions, only if a field (body) is populated. This is my faulty code: <?php if ($page->sectionfield_fa_membership->body) : ?> <section class="membership"> <ul uk-accordion> <li itemscope itemprop="mainEntity" itemtype="https://schema.org/Question"> <a class="uk-accordion-title" href> <p itemprop="name">Membership</p> </a> <div class="uk-accordion-content" itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer"> <div itemprop="text"><?= $page->sectionfield_fa_membership->body; ?></div> </div> </li> </ul> </section> <?php endif ?> I'm getting this error: Attempt to read property "body" on null The logic is based on this code: <?php if ($page->body) { echo $page->body; } ?>
  2. Hello, I have the following selector and output which works when I am logged in as an admin and as a guest as well. $pages->get("name=reports")->children()->each("report_meta_details.report_type.title") //Output //Array ( [0] => Global [1] => Global [2] => Global [3] => Global [4] => Global ) Now, The following selector returns different results for Admin and Guest: $pages->get("name=reports")->children("report_meta_details.report_type.title=Global")->each("report_meta_details.report_type.title"); //Output for Admin //Array ( [0] => Global [1] => Global [2] => Global [3] => Global [4] => Global ) //Output for Guest //Array ( ) Here, the field "report_meta_details" is a FieldsetPage, the field "report_type" is a page reference (to children of a page called report-type). Now, the first once runs for both the users; and both the users have the access to the templates, as the titles are returned correctly in the first selector. But the second one, the selector is using something that the users have access to but still does not show the results to the Guest. Any reasons why this is the case? All help is appreciated. Thanks! EDIT: I have tried the check_access=0 selector as well. But no effect.
  3. Hello I've created a repeater field and have tried to add it to a FieldsetPage field. I've noticed that when inside the FieldsetPage it doesn't allow the option to clone individual repeater items. (I had originally posted this in the ProFields support forum thinking that it was isolated to repeatermatrix fields but have since seen the same result with standard repeaters, so just posting here in case anyone else has any ideas) See below image that shows both scenarios (clone button highlighted red not showing when inside fieldsetPage field) I'm sure there's probably a reason for this that I'm just not aware of, but just thought I'd check if this is intentional or if I have just found a bit of a bug? Ideally, I'd like my client to be able to have the ability to clone items and plan to have quite a lot of repeater matrix types included here so thought I'd check as it may affect how I set up my templates. Thanks in advance for any help or suggestions.
  4. Hi, is there a way to activate the option Input > Visibility > Presentation > "Open when populated + Closed when blank" for a Fieldset (Page) containing some fields like text or textarea? To me it is always open, even if all fields inside are empty. Thx, Matze
  5. In my code, I create all the fields I want included in the FieldsetPage - all good. I then create my FieldsetPage field and it appears in the Admin->Fields list - seems all good. $fields = wire('fields'); if(!$fields->get("name=widget_title")) { $field = new Field; $field->type = $modules->get("FieldtypeText"); $field->name = "widget_title"; $field->label = $this->_("Message Title"); $field->description = $this->_("Max length 64 characters."); $field->maxlength = 64; $field->stripTags = true; $field->tags = "widget"; $field->set('showCount', InputfieldText::showCountChars); $field->save(); } // Fieldset page (requires PW v3.0.74 or later) if(!$fields->get("name=fspage_widget")) { $widget = new Field; $widget->type = $modules->get("FieldtypeFieldsetPage"); $widget->name = "fspage_widget"; $widget->label = $this->_('My Widget'); $widget->tags = "widget"; $fields->save($widget); } Problem arises when I try to add fields to the FieldsetPage. While the field is created, the template and field group are not. When I try to add via code, eg $widget = $fields->get("name=fspage_widget"); $templateName = FieldtypeRepeater::templateNamePrefix . $widget->name; // Correct name but no template yet assigned to FSPage field $template = $templates->get($templateName); // results in NULL $fg = $template->fieldgroup; // Ditto due to above $titleFld = $fields->get("name=widget_title"); $fg->add($titleFld); $fg->save(); // No fieldgroup so no save it falls over with NULL template and NULL fieldgroup. I can manually add fields to the FieldsetPage via the admin field edit screen, at which point the appropriate template & fieldgroup get generated. If I try to force the creation of the template in my code when I create the field, I end up with 2 templates - repeater_fspage_widget and repeater_fspage_widget1. That leads to all kinds of madness and no fields appear in the admin edit screen for 'fspage_widget' even though the field(s) I add show they're attached to a template. It's all clearly visible in the database. I've read everything I can find including the actual code and this forum article: In this scenario, the fieldsetPage fields with their templates & fieldgroups already exist and are being migrated. Even @ryan says a the end: So, question is, after adding a new FieldsetPage field via code, how do I programmatically add its template, fieldgroup & fields?
  • Create New...