Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.9.4-RC5 is now available! Go get it now

Change and Merge in open.php

Hi

I would like to change the Email field in Open Ticket.

What I am trying to do is make the email field Username then have a fixed value for the rest of the email address.

So for example:-

User Input = theirusername
Fixed Value = @mycompany.com

Output result for email value becomes: [email]theirusername@mycompany.com[/email]

This would save staff from having to type their entire email address and is not messy as it would be if the field value was set to @mycompany.com and the user was expected to input their username before the @.

Can anyone help me with this.

Many thanks

Yogiman!

Comments

  • there are a few ways you could do this...

    you could make the value of the textbox = @mycompany.com and then al the user has to click is before the @

    or

    create a textbox and hide the one with the @mycompany.com and then use an onclick on the submit to make it combine the two text boxes...

    or

    use an onclick on submit to add the domain onto the end of the username string
  • Hi

    Thanks for your reply, we have attempted your suggestions, however we have fallen at the post.

    When we attempt to merge the fields we get an error saying that a valid email address is required, so we are not sure if the original input field is being validated or if the variable email is being validated.

    Thanks

    yogiman!
  • Its this part on the open.inc.php that you would need to edit - this is my modded code so amy be slighty different to yours.

        <fieldset>
    <div>
    <label class=\"formlabel\">Email Address:</label>
    <?if ($thisclient && ($email=$thisclient->getEmail())) {
    ?>
    <input class=\"forminput\" type=\"hidden\" name=\"email\" size=\"25\" value=\"<?=$email?>\"><font class=\"autofill\"><?=$email?></font>
    <?}else {?>
    <input class=\"forminput\" type=\"text\" name=\"email\" size=\"25\" value=\"<?=$info['email']?>\">
    <?}?>
    &nbsp;<font class=\"error\">*&nbsp;<?=$errors['email']?></font>
    </div>
    </fieldset>
  • Many thanks for the reply, I will take a look and see if my small brain can figure it out.

    Again thank you for your helpful response :)
Sign In or Register to comment.