Posted: 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? |
|
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?
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. |
|
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:
Any way we could get code like that working in Event Expresso at our end? |
|
Hi, are you entering this on your end so you are wanting to prevent editing of those fields? — |
|
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. |
|
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 — |
|
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. |
|
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? — |
|
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. |
|
|
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:
This allowed the validation to continue and not block the process. Can you try this and see if it helps? |
Thanks Dean, with that change, the code works perfectly now. |
|
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.