Home › Forums › Calendar Products › Community Events › Required fields are not applying to "Edit/Update" screens
- This topic has 16 replies, 6 voices, and was last updated 5 years, 4 months ago by Courtney.
-
AuthorPosts
-
June 18, 2018 at 8:16 am #1555443themalParticipant
We have implemented “required” fields for “Organizer Phone and Email” which work fine in the “community/add” screen, however, they have no affect in the “community/edit” screen. Thus, a user can bypass required fields by updating.
Is there a way to stop this?June 19, 2018 at 5:59 am #1556054Jaime MarchwinskiKeymasterHi Mal,
Thanks so much for reaching out!
Would you mind sharing your method for making fields required?
I just tested the functionality, using the following tutorial, and it worked in the Edit page as well.
https://theeventscalendar.com/knowledgebase/required-fields-for-events-submission-form/
Let me know if you have any other questions in the meantime!
Thanks,
Jaime
June 20, 2018 at 7:44 am #1557069themalParticipantHello Jaime,
Thank you for the response. This is exactly the document we followed using the exact code with the additional field:
$fields[] = ‘Phone’;As mentioned, this makes “Phone” required for community/add (new entries) but one the event is added, you can go to edit event, edit organizer and “Phone” is no longer required. The “Phone” can be removed and the organizer updates without errors.
If this is working properly in your setup, please provide a test link that we may compare with.
Thank you.
June 20, 2018 at 10:55 am #1557429Jaime MarchwinskiKeymasterHi Mal,
Can you provide me with the exact code that you are using, as well as your system information in a private reply using the instructions found in the following link?
https://theeventscalendar.com/knowledgebase/sharing-sys-info/
Also, does the snippet provided in the article work for you if it is not an additional field?
Let me know if you have any other questions in the meantime!
Thanks,
Jaime
June 21, 2018 at 7:15 am #1558259themalParticipantThis reply is private.
June 22, 2018 at 4:48 am #1559059Jaime MarchwinskiKeymasterThanks for providing me with that information.
I am seeing some errors related to that code. Just to let you know, we are limited by our Support Policy in how much we can help with customizations, but I will try to point you in the right direction.
I’d recommend starting off by updating your PHP version to at least 5.6, as recommend here:
https://theeventscalendar.com/php-version-requirement-changes/
Let me know if that helps!
Thanks,
Jaime
June 27, 2018 at 5:47 am #1562567themalParticipantHello Jaime,
Could you please clarify “I am seeing some errors related to that code”. Are these errors with the code we are using (straight out of the example) or code at your end?
The system info was from a development server. The production server has PHP 5.6 and the problem still exists.
Thank you.
June 28, 2018 at 5:33 am #1563465Jaime MarchwinskiKeymasterI see the following error when I use your code on my site:
PHP Warning: Use of undefined constant ‘my_organizer_community_required_fields’ - assumed '‘my_organizer_community_required_fields’' (this will throw an Error in a future version of PHP) in /Users/xxxx/Sites/test-site/wp-content/themes/twentyseventeen/functions.php on line 25
I hope this helps to clarify things for you!
Thanks,
JaimeJune 29, 2018 at 6:28 am #1564444themalParticipantHello Jamie,
Actually no.
1. Warnings should not cause errors and defiantly should not cause “Add” to function properly and “Edit” to not function.
2. From your output, the assumed is exactly the same as the called?
3. This code is a direct copy and past from your example/tutorial at:
https://theeventscalendar.com/knowledgebase/required-fields-for-events-submission-form/June 29, 2018 at 10:48 am #1564692Jaime MarchwinskiKeymasterI’m sorry that you have not been able to get this to work. I can tell you that on my test site, I am able to get the code from that knowledgebase article to work as expected. This code works on both the Community Add and Edit pages. Do you see the same results?
Let me know!
Thanks,
Jaime
June 29, 2018 at 12:13 pm #1564754themalParticipantHello Jaime,
Would I be able to try this on your test site?
Are you sure you are testing following these steps:
Go to <url>/events/community/add
Login as a subscriber
Fill out event information
– Organizer Phone and Email are required fields and this works fine.
After submitting the event go to <url>/events/community/list
Select the event for editing
click on “Edit Organizer”
clear out the Phone and/or Email (which where required fields on “Add Event”)
click on “Update Organizer”
– no errors are produced and the Phone/Email are blank, thus, bypassing the requirements.July 2, 2018 at 4:50 am #1565748Jaime MarchwinskiKeymasterUnfortunately my test site is a local site, so it is not accessible for testing.
Using the code you provided, the fields do not become “required” at all. However, I have tested this functionality with the required Event URL snippet provided in that article and followed the steps you outlined.
In that case, if I removed the Event URL in the Community Edit page, I did receive error, so I was unable to reproduce the error that you are describing.
In any case, we are limited in our assistance with custom coding here, as per our Support Policy.
If you’d prefer not to tackle this customization on your own, we may be able to assist you further. We do need to prioritize support requests from other customers at this time but I’ll certainly flag this with the team and – although we can’t make any promises – if we have time and space to come back and help, we’ll be happy to do so. Please let us know if you’d like to go this route so that you can be added to this queue.
In the meantime, if there is any more information you can share (including mocks) that will help us to better understand what you are seeking please do feel free to add them to this ticket.
If you urgently need help with this, however, you may instead wish to consider working with a suitably skilled developer or designer who can offer the additional level of support you require.
Let me know if you have any other questions on this topic!
Thanks,
Jaime
July 9, 2018 at 7:46 am #1570690themalParticipantHello Jamie,
I’m very confused. The code I am using and sent to you, is your code from the tutorial/example.
Can you please explain “if I removed the Event URL in the Community Edit page”?
Thank you.
July 9, 2018 at 3:18 pm #1571113BarryMemberHi @themal,
Thanks for your patience so far.
I think I see the disconnect, which is that you are expecting the required field logic you added to work in the frontend edit screens for organizers and venues whereas it is designed only to function in the context of the event editor.
I realize this may not be ideal, and will log a ticket to make things a little more flexible (and will also update the knowledgebase article to make the limits of this approach a little clearer).
Our apologies for any confusion that’s been caused.
July 31, 2018 at 9:35 am #1586813Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Required fields are not applying to "Edit/Update" screens’ is closed to new replies.