The Frayed Ends of Sanity

  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About The Frayed Ends of Sanity

  • Rank

Recent Profile Visitors

42 profile views
  1. This all looks interesting as usual. Thanks Can someone explain what the following means for PW? Preferably with an example of how it would be used?
  2. I really really appreciate the solutions you guys are churning out. Thanks for sparing your time. I have been reading up a bit more and decided to have a bash at something myself. I wanted an * placed before the labels of required Text and Textarea fields. So I came up with the following loop that works but I'm worried I've missed something. foreach ($form->children as $field) { // loop form fields if($field instanceof InputfieldText || $field instanceof InputfieldTextarea) { if($field->required === "required") { $field->label = '* ' . $field->label; } } } Does this look good to you? Thanks again
  3. Thanks a lot everyone it means a lot. I am not sure where you lot get this information from as I am new to all this but I do have one more related question for which I don't know where to look. If we go back to the buildLoginForm hook we find the following for the submit button..... /** @var InputfieldSubmit $submitField */ $submitField = $this->modules->get('InputfieldSubmit'); $submitField->attr('name', 'login_submit'); $submitField->attr('value', $this->_('Login')); // Login form: submit login button $submitField->appendMarkup = $this->wire('session')->CSRF->renderInput(); $form->add($submitField); Now again I have no idea how to change the login button name from the API. I know it can be done via the translation method above, but how would I do it via the API? I've tried many things and it all ends in failure. I have the following code so far, but have no idea how to dig deeper.... $wire->addHookAfter('LoginRegister::buildLoginForm', function($event) { $form = $event->return; $form->description = false; // Remove the description $event->return = $form; }); Thanks again and sorry to be a pain
  4. Hi @bernhard I honestly didn't think about the css method, and I was thinking more along the api etc. If I hook into buildRegisterForm() how would I actually remove the description of the form? Thanks
  5. Thanks for that lengthy reply. I did actually find the code you linked to, but It was the reference to the actual H2 heading I couldn't find. So it appears there is no easy way of changing that heading tag at the moment or indeed removing it from our markup? It seems we can only change the actual text? In reference to the profile image (avatar) I was referring more to the fact of extending the module to allow the use of an image field. Currently it's not supported, so I was fishing around for ideas of the best way to achieve this from the front end. Thanks again!
  6. Hello everyone, I have some questions regarding some basic customisation for the new LoginRegister module markup. If you look at the demo registration page you will notice it has the header of Register for an account which if you look at the source code equates to: <h2>Register for an account</h2> Now I've looked through the actual module code and I can't find where the H2 heading comes from, or how to change it? I'd like to be able to change the heading size, text and also to have the ability of not outputting the heading at all. But how do I do that? I'm just generally at a loss as to how I can take control of the form output. Also, profiles nowadays usually have an avatar or picture attached, so what's the best way to go about that if I already have an image field attached to the profile. Thanks in advance.