Support

Home Forums Event Espresso Premium Customization to Event Reg Form

Customization to Event Reg Form

Posted: June 3, 2020 at 8:01 am


cazarinint

June 3, 2020 at 8:01 am

I have read /topic/customizing-the-user-registration-form-and-emails/ and we have a similar issue.

  • WP User integration active
  • Have the No Sync active (to prevent WP user changes accidentally)

What our client would like is to disable entry on the Registration form I am wondering if I can use similar hooks to just add the “Disabled” element to the input forms. Or if we can copy a template into our child theme the problem is so far I have not found the template that needs to be updated.

Will either of these work, I preferred not to add additional JS and CSS doesn’t apply the disabled


Tony

  • Support Staff

June 4, 2020 at 5:30 am

Hi there,

When the form input is generated there are a couple of filters available:

FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__input_constructor_args

Which as the name suggests is passed to the input’s constructor and you can set disabled to true there.

Or FHEE__EE_Question__generate_form_input__return which filters the form input object itself, so you can run the disabled method on it yourself.

Note that you’re going to need to check that you are disabling the correct inputs and not just all when doing this.


cazarinint

June 12, 2020 at 8:19 am

Tony,

I seem to not be as smart as I think :). I’m wondering if you have any examples or scenarios that I might be able to use to learn how to do this. I would like to learn but I am stuck here.

Thank you,
David


Tony

  • Support Staff

June 12, 2020 at 10:03 am

I don’t have any examples of disabling inputs, but I do have an example of using the FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__input_constructor_args hook here:

https://gist.github.com/Pebblo/0abe11d85af126e0aa0db80b1772901b

Setting the constructor arg ‘disabled’ to true should disable the input.

Does that help?

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: publish

Updated by  Tony 4 months, 2 weeks ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!