You can make the Requester email field on the End User Portal "read Only" by adding the below script to the new ticket form. To add the Script Goto Admin->Helpdesk Rebranding->Customise Portal->switch to the "Layout & Pages" Tab -> Click on Portal Pages-> Navigate to the New Ticket Page on the Left Hand Pane and add the script at the very end->Click on Save & Publish. This will make the field readonly and you cannot change the email address as an End User. Hope this helps.
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#helpdesk_ticket_email").prop( "disabled", true );
});
</script>
This solved my problem
Thank you so much, below is the code that worked for us (I guess something changed in the last three years). It’s unfathomable why Freshservice cannot see the integrity concerns of having this field be freely editable.
<!-- To make the "requester" field read-only for new ticket forms -->
<script>
jQuery(document).ready(function(){
setInterval(function() {
if (window.location.href.indexOf('/support/tickets/new') > -1) {
var field = jQuery('#helpdesk_ticket_email');
field.prop('readonly', true);
field.css('background-color', '#d3d3d3'); // This will make the field appear grayed out
}
}, 200)
})
</script>
<!-- end of code -->
This did the trick for me - the script possibilities is blocked.
#ticket-new-main .default_requester .control-element input {
max-width: 800px;
margin-top: 4px;
margin-bottom: 8px;
background-color: #e0e0e0; /* Gray background */
color: #757575; /* Dimmed text color */
pointer-events: none; /* Prevents clicking and typing */
}
@bilalbahij That looks better than running a script. Exactly where did you put this snippet?