XF 1.1 Contact Us - extra fields

Morgain

Well-known member
Can anyone tell me how to add extra fields to the Contact Us form?
I've done it with other email scripts so I know the outline.
I guess I need to

- add the fields and label text to the correct frontend template
(copy an existing field snippet and tweak)

- add that field name to the correct form function file for it to include in the notification email to me
( copy an existing line of code and tweak)

So any chance of a nudge on where to find these two, the frontend template and the script?
 
Ok there is an ordinary template for what the email form looks like, and I can add fields to it.
I think I need to make matching values in the template you told me.

But now I have 5 textboxes as well as the textarea which looks a bit daunting.
It would look better if the textboxes were not so big- wide.

I checked Forms in Style Props but there's no control for the textbox, only the label.

The textbox code in the Contact template is
Code:
            <dd><input type="text" name="_guestUsername" value="{$visitor.username}" id="ctrl__guestUsername" class="textCtrl" autofocus="true" />
 
I got a certain amount done.
I was able to restrict the width of the input textboxes by simply adding width=25" to their code.
I also made the subject line hidden - type="hidden" - so I can use message rules on it on my end.

I also added two text fields to the form, with their labels.
But the test info I put in them does not get included in the email body which is what I want them to do.
From other email scripts I've configured before I imagine I need to insert the ID if these fields in the form script itself which sends the email.
So where is that?

Finally the processing of this form is minimalist to say the least. I would like a courtesy confirmation page to appear which I can customise to say thanks your email has been sent and we'll answer within a few hours.
can anyone help me with that? I know it's very standard php mail so I might be able to figure it out but as I don't have access to the form script I cant do it yet.
 
Top Bottom