Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

cryostar's Achievements

Jr. Member

Jr. Member (3/6)



  1. I just came across this module and I'm just curious how do we send the unsubscribe group ID for this one? Generally, the approach is to add it in the JSON: { asm: { group_id: <the unsubscribe group ID> } } but I checked the modules and there's setCustomArgs, setSection, and I don't know which of these I should put this parameter.
  2. The only link-related fields I see are Page References and URL. Although none of these two fields support for having a custom text inside the anchor tag, so what I did was to create to fields - a 'link' URL field and a 'link_title' text field. This sound counterintuitive so I would like to know if there are some good solutions out there.
  3. So I have this weird request from the client that she wants to hide some statuses in the settings - hidden, locked, unique because it will be confusing to her editors and some of these settings are too powerful for them too. Is there a way to hide these?
  4. @alexm Thank you! This one works perfectly. ☺️
  5. I used the LoginRegister module for my members' portal, and part of the registration form is a field called "Where did you hear about us?" which is an InputFieldCheckboxes field. I don't want to set this as required on the user template because that would also be required for staff users as well. So I set up a hook before "LoginRegister::renderRegisterForm" to set it to required. $form->getChildByName('register_referralmode')->attr('required','required'); It works for other fields that I set to required in this approach, but this field in particular is not applying that attribute. Any thoughts on what could be the issue here?
  6. By “uses” I meant on my custom admin page I have an ___execute() method which gets the ProcessPageLister and renders it. My problem is I cannot seem to view the bookmark because the path is not recognized by my admin page (it directs me to /my-custom-admin-page/sometokenstringherefromlister). I’m not sure how extending the lister would help in my custom admin page on recognizing a random string as its path. Thank you for the help still, though. ?
  7. I have a custom admin page which uses a ProcessPageLister module. I was already able to enable adding and modifying bookmarks by creating an ___executeEditBookmark() function on my admin module. The only thing left is to view said bookmark in the same Lister. What I noticed is that the "View" link contains an additional path which appears to be the token for said bookmark (so it's /my-admin-module/somerandomtokenstring). How do I catch this one? When I click on the View link it shows an "unrecognized path" error. Thank you for the help! ?
  8. Hi all, I used LoginRegister for my front-end authentication and I noticed that when you type in an invalid password on the profile form, the form can still be submitted thus saving my password. Here’s my repro steps: 1. Go to LoginRegister profile form 2. Type in an invalid password (like ‘b’) 3. Submit I have enabled to include the current password on my profile form but that didn’t perform any validation. Has anyone experienced this as well?
  9. I was creating a session redirect for unauthorized visits. if(!$user->isLoggedin()) $session->redirect('/members/login?redirectUrl='.$page->path(), false); but what happens is that this query string is not present when it redirects to "members/login". Additionally, since I was using LoginRegister (not Pro) for front-end logins, I have a separate profile page but the module requires that "profile=1" is appended in the query string. So I placed it in the anchor tag. <a href="/members/profile?profile=1">Profile</a> but the same happened - the query string is removed. But when I click on the "Edit Profile" button of LoginRegister the query string is preserved. What could be the cause of this?
  10. The answer lies in my ___execute method in my module file. I should return the lister only if it's an AJAX request. So I was able to do it with: if($this->config->ajax) return $lister->execute(); return array( 'table'=>$lister->execute() ); under ___execute
  11. I created a PW module for a new admin page and I have set some buttons and a lister in an execute.php file: <div> <a class="ui-button" href="./upload-batch-record">Upload batch</a> <a class="ui-button" href="./export-filtered">Export filtered result</a> <a class="ui-button" href="./generate-template">Generate CSV Template</a> <a class="ui-button" href="<?= $addUrl ?>">Add New</a> </div> <hr class="uk-divider-small" /> <?= $table ?> Though to my surprise, Lister is also generating these buttons on top of the table like this: What can I do to prevent this?
  12. Your question regarding titles is a common question, actually. About your structure, I’m keen on advising against creating the questions as individual pages, I would rather you purchase ProFields and use a Table field instead - ProFields might even solve the problems you’ll have in the future. Not only will you have an ease in development, you’ll also support ProcessWire since this is an open source project and it relies on these paid modules for funding.
  13. Thanks @BillH! Using hooks is actually on top of my head though I was just wondering if there are other straightforward solutions that don't require code. If anyone has a requirement like I do that should make certain fields read-only when they are populated, here's how I did it (saved under ready.php): $wire->addHookBefore('Page::loaded', function(HookEvent $event){ $_page = $event->object; if($this->page->process !== 'ProcessPageEdit') return; //Run only if you're on the admin page editor if('specifictemplate' != $_page->template) return; //If only you want to lock it for certain fields if(!$_page->thatfield) return; //This is a Page Reference that returns false if there is no value $thatfield = $_page->getField('thatfield'); $thatfield->collapsed = Inputfield::collapsedNoLocked; });
  14. Is it possible to lock a field on the Edit page once it's been populated? If not, how do I prevent users from editing a field further?
  15. I did what you said but seems like it didn’t work. Do I have to put it in a class for it to work? Currently it’s all a list of functions so I’m not sure if namespacing works on these kinds.
  • Create New...