• Content count

  • Joined

  • Last visited

Community Reputation

10 Good

About Sipho

  • Rank
    Jr. Member
  1. @Macrura Thanks! addBlankOption worked. I also managed to get the custom json working by hooking extendAttributes
  2. As a tangent question, is it possible to use InputfieldSelectize for non-page inputfields? So for example, using InputfieldSelect I can say: <?php $f->addOption("pie","Pie"); But using InputfieldSelectize I can't seem to figure out how to get the value in the itemDataArray. Is there a way to do this?
  3. Sorry I forgot to mention I am creating the inputfield from the API. Here is the code I am using to generate it: <?php $template = "family"; $label = "Family"; $f = $this->modules->get("InputfieldSelectize"); $f->name = $template; $f->label = $label; $f->required = true; $f->columnWidth = 33; $f->addOption(""); $f->set("itemDataArray", '$data = array("title" => $page->title);return $data;'); $f->set("renderOptionMarkup", "'<div class=\"item\"><span style=\"display:block;font-size:14px;font-weight:bold;\">' + escape(item.title) + '</span></div>'"); $f->set("renderItemMarkup", "'<div class=\"item\"><span style=\"display:block;font-size:14px;font-weight:bold;\">' + escape(item.title) + '</span></div>'"); foreach ($this->pages->find("template=".$template) as $p) { $f->addOption($p->id, $p->title); } $f->attr("value", ""); $form->add($f); I haven't included the whole form as I don't think it's relevant. I believe it would have to be InputfieldSelectizeMultiple for it to be set to multiple pages, so it's set to single pages. If I just change required to false, it behaves as expected. Maybe I am incorrectly using the API.
  4. @Macrura This is when using required InputfieldSelect: <select id="Inputfield_family" class="required" name="family" tabindex="5"> <option selected="selected" value=""></option> <option value="1084">Saturniidae</option> </select> This is when using non-required InputfieldSelect <select id="Inputfield_family" name="family" tabindex="5"> <option selected="selected" value=""></option> <option value="1084">Saturniidae</option> </select> This is when using required InputfieldSelectize: <select id="Inputfield_family" class="required selectized" name="family" tabindex="6" style="display: none;"> <option value="1084" selected="selected">Saturniidae</option> </select> This is when using non-required InputfieldSelectize <select id="Inputfield_family" name="family" tabindex="6" style="display: none;" class="selectized"> <option value="" selected="selected"></option> </select>
  5. @Macrura When I set an InputfieldSelectize to required, the first value is selected. Is there any way to prevent this? I wish to have it behave as it does when not set to required, the same way that InputfieldSelect does it. This might be really dumb, but I couldn't find it mentioned anywhere.
  6. I also got this on 3.0.62 and @Soma's fix worked. I can't exactly tell what caused it. In my case has_parent only worked for the direct parent. Anything higher would fail to find anything.
  7. @Macrura Feature request: Would it be possible to make the field refresh after page changes? In your examples, you put an editUrl that opens a modal. After making an edit in a modal, the field does not reflect the changes made. Another example is when creating new pages. I like to use PageFieldEditLinks by @thetuningspoon but after adding a page, it doesn't show up in the selectize options. Maybe this should be a feature of PageFieldEditLinks instead. It might need cooperation between you two. I believe you made the original AdminPageSelectEditLinks? I am not too sure I tried making my own hacky changes to PageFieldEditLinks but it didn't work too well. Otherwise, this is a really great module
  8. @Macrura No problem
  9. @Macrura After updating to the latest version of InputFieldSelectize(1.0.3) I now get the following error when I try to view a field using InputFieldSelectize I am running ProcessWire version 3.0.62
  10. I recently needed a module that automatically fills the title field of a page using fields on that page. I couldn't see one that already existed so I made my own. This is mostly based on ProcessSetupPageName by @kixe which I use along with this module. Keep in mind I am very new to ProcessWire so perhaps somebody else can contribute or make a better one Note: The title is automatically hidden when using this module You can enter any string. To add a fieldname, subfield or property, you surround the fieldname with {}. Dot syntax allowed. Example: Fish: {parent.title} {myfield}
  11. @bernhard To clarify, I basically want a PageTable but with the repeater matrix editing interface as @adrian said.
  12. @bernhard I don't quite understand how it matches what I described. Doesn't it only let you edit titles? To edit all the fields don't you still have to open a model like a PageTable? Maybe I am missing something. Could you explain how it could be used for what I described?
  13. @szabesz I just want some simple AJAX editing for pages . I don't mind about column sorting as much as this. For now I will just continue using PageTables with modal editing, as inconvenient as it is. I would also join in the crowdfunding to push this forward @adrian I really wanted something that did make pages with actual URLs that can be visited. I don't really feel comfortable using Repeaters in that way. It's just not what they were designed for (I think).
  14. @bernhard It won't be just simple text so handsontable is out. ListerPro looks interesting but still inconvenient and not free. @adrian Can you choose a template for Repeater Matrices? From what I can gather it's the same as a repeater but you can have more than one 'field set'. The reason I wan't to be able to specify the template is because I want them to be actual pages that an end-user can visit. Being able to edit them inside a page without opening a modal is just for convenience. They should still behave as proper unhidden and non-admin pages. I could just use a PageTable but it is such a hassle.
  15. @bernhard I am aware of PageTable but it doesn't suit my needs. I want it to be editable directly on the page without having to click on a link to open a modal. Like a repeater does it. PageTable is exactly what I want apart from that. Sorry I didn't make that clear.