Jump to content

thei

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by thei

  1. Hi, i'am new with FrontendForms. I use v2.2.16. When i set custom classes it is ignored. When i define a framework as described i can select it in the settings and save the config. But nothing happens. The class names i see in the generated html are always the same generic names e.g. fieldwrapper etc. So, i can write by my own a class "fieldwrapper" and it works - sure. But this is - as far as i understood the documentation - not the intention of framework files: to be without effect. Where do i get it wrong? Or is there a bug? Thank you for your help
  2. Ah! i see. It's the keyword 'options'. In my example i used 'text'. I just tested it and it works using when 'createField()' - great! Thank you!!
  3. i'm using Rockmigrations the first time. I copied field settings (Rockmigration Code) from an Processwire site in the migration.php of a new Processwire environment. It works fine except for one options field: it throws Fatal error: Uncaught Error: Class "ProcessWire\SelectableOptionManager" not found in /var/www/html/app/site/modules/RockMigrations/RockMigrations.module.php on line 4144 here is the code $rm->createField('country', 'text', [ 'collapsed' => 0, 'columnWidth' => 100, 'defaultValue' => '', 'flags' => 0, 'icon' => 'flag-o', 'initValue' => '', 'inputfieldClass' => 'InputfieldSelect', 'label' => 'Country', 'options' => [ 65 => 'Germany', 120 => 'Namibia', 1 => 'Afghanistan', 2 => 'Albania', 3 => 'Algeria', 4 => 'Andorra', 5 => 'Angola', 6 => 'Antigua and Barbuda', 7 => 'Argentina', 8 => 'Armenia', 9 => 'Australia', 10 => 'Austria', ...etc... ], 'required' => '', 'requiredIf' => '', 'showIf' => '', 'tags' => 'address', 'themeBorder' => '', 'themeColor' => '', 'themeInputSize' => '', 'themeInputWidth' => '', 'themeOffset' => '', 'type' => 'FieldtypeOptions', ]); I do not understand what the problem is with the options field Thanx for ideas and help 🐵
  4. Hi BitPoet, YES indeed it works. Thank you very much!! Nevertheless this case should be handled inside PW rather than checking for $page in the user defined hook. HM... what is the further procedure here. Should i report a bug? Where? Otherwise: the guideline here in this forum says, i should mark this as 'soved' by clicking the 'mark-as-solved' button. BUT there is no 'solved-button' displayed here ?
  5. what is the procedure now? should i write a bug report? i guess here https://github.com/processwire/processwire-issues/issues ? Thank you for your help ?
  6. hm. if i download the latest stable i get a 3.0.227 (cannot find a 228) with 3.0.227 still the same behavior. OK found 229. same problem.
  7. but for a repeater field the page object is of class RepeaterPage. Using ->template returns 'repeater_....' which is not the name of the embedding page. The documentation of RepeaterPage describes a getForPage
  8. i 'm writing a hook for repeater labels $this->addHookAfter('InputfieldRepeater::renderRepeaterLabel', function(HookEvent $event) { // Get the object the event occurred on, if needed $InputfieldRepeater = $event->object; // An 'after' hook can retrieve and/or modify the return value $return = $event->return; // Get values of arguments sent to hook (if needed) $label = $event->arguments(0); $cnt = $event->arguments(1); $page = $event->arguments(2); // Your code here, perhaps modifying the return value // just a simple test: $return = "LABEL " . $page->getForPage()->template(); // Populate back return value, if you have modified it $event->return = $return; }); this hook function works (e.g. if i return a constant string) as long as i don't use '->getForPage()' the error message is '...... Page::getForPage does not exist or is not callable in this context' The hook is in 'ready.php'. it seems the events setting especially "$page" property is not complete within context? i want to set the repeater labels only if the parent of pages has a special template. (i m using Version 3.0.210) What i am doing wrong? Who can help? Thank You
×
×
  • Create New...