Support

Home Forums Event Espresso Premium Text-Field Read-Only & Saving Inputs

Text-Field Read-Only & Saving Inputs

Posted: April 3, 2015 at 3:16 pm

Viewing 10 reply threads


Fitness Universe

April 3, 2015 at 3:16 pm

Is there a way to make the text field read-only? Currently, we’re taking in member information and putting it into our entry form. We would like to disable editing in two of the fields if possible.

Also, is there a way to save the inputs from the text fields into the WordPress profile for future use?


Tony

  • Support Staff

April 3, 2015 at 3:26 pm

Hi,

Currently its not possible to set fields to be to read-only on the front end, however you can set fields to be Admin Only. Meaning only the Event Admin can view/edit those questions, would that work?

Also, is there a way to save the inputs from the text fields into the WordPress profile for future use?

We have the WP User Integration Add-on which will automatically save the default personal info and address questions to the account, saving custom questions would require custom development currently.


Fitness Universe

April 3, 2015 at 3:45 pm

Hi,

Thank you for the prompt reply. It’s a shame we can’t get custom questions to save onto WordPress.

Also, we would like people to view their name, so making it Admin-only wouldn’t work. We just want to make the ‘First Name’ and ‘Last Name’ fields read-only.

For example:

First Name: <input type="First Name" name="firstname" value="Obtained from WP" readonly><br>
Last Name: <input type="Last Name" name="lastname" value="Obtained from WP" readonly><br>

Any way we could get code like that working in Event Expresso at our end?


Lorenzo Orlando Caum

  • Support Staff

April 3, 2015 at 4:33 pm

Hi, are you entering this on your end so you are wanting to prevent editing of those fields?


Lorenzo


Fitness Universe

April 3, 2015 at 4:38 pm

In our site we want to prevent people from editing their name as it will always be entered via their WP profile info.

We want to know how to do this, how to edit Event Expresso code to disable the text input for the name field.


Lorenzo Orlando Caum

  • Support Staff

April 3, 2015 at 5:15 pm

Hi,

Here is an example of how to do that:

https://gist.github.com/lorenzocaum/34e45008a9f7bf32ee34

Be sure to change 123 to the page ID of your actual registration checkout page.

Thanks


Lorenzo


Fitness Universe

April 3, 2015 at 6:03 pm

Hi Lorenzo,

Thank you for the code, it works, but when clicking the button to proceed to the next step, it wouldn’t do anything. When we removed the code, it worked as usual and went to the next step.


Lorenzo Orlando Caum

  • Support Staff

April 3, 2015 at 6:19 pm

Hi,

The fields already have content in there right?

If they are blank, they won’t work since Event Espresso needs a name and an email to process a registration.

Could you clarify?


Lorenzo


Fitness Universe

April 3, 2015 at 7:38 pm

Hi Lorenzo,

Yes, that’s correct. All the fields that required content (in Step 1: Attendee Information) were filled out with random text in order to test it. With the code you provided, we weren’t able to proceed to Step 2: Payment Options, even with all the required fields filled out. When clicking the ‘Proceed to payment options’ button, it wouldn’t do anything and not proceed to the next step.


Dean

April 6, 2015 at 3:01 am

Hi,

I didn’t see your exact issue (a failure to proceed), instead I was provided with an error message advising that the fields cannot be validated. Now this is perhaps the same thing that is happening for you, but for some reason the error isn’t appearing.

What I did was to modify Lorenzo’s code slightly so it used readonly instead of disabled:

jQuery("input[id$=-fname]").prop( "readonly", true );
jQuery("input[id$=-lname]").prop( "readonly", true );

This allowed the validation to continue and not block the process.

Can you try this and see if it helps?


Fitness Universe

April 6, 2015 at 12:05 pm

Thanks Dean, with that change, the code works perfectly now.

Viewing 10 reply threads

The support post ‘Text-Field Read-Only & Saving Inputs’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso