The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Custom form Tutorial - Script not working

3 posters

Go down

Solved Custom form Tutorial - Script not working

Post by Matikka Mon 5 Dec - 23:48

Hello,
i am using the tutorial where you can add a custom Form on topic creation and for some reason it's not showing up in the text box (which is default) can someone please check the script to see if i have done it correctly and maybe provide a working fix.

If you need my Forum information let me know so that i can edit this thread and add in the Information you need hopefully this can be fixed. here is the tutorial link so you know which one i am following it say's for all Forums i am using PHPBB2.

@Ange Tuteur
Tutorial Thread for Custom Form
Custom Form Tutorial

Code:
$(function() {
    if (location.pathname == '/post' && location.search == '?f=30&mode=newtopic') {
      $('#text_editor_textarea').val('[color=#FFFFFF][b]Support Type[/b][/color]:/n[color=#369FCF][b]Your new Forum Name[/b][/color]:/n[color=#FFFFFF][b]Ban/Suspension length[/b][/color]:/n[color=#369FCF][b]New Account Icon[/b][/color]:/n[color=#FFFFFF][b]Have you Forgot a Password[/b][/color]:/n[color=#369FCF][b]Avatar / Signiture Change[/b][/color]:/n[color=#FFFFFF][b]Missing Forum Badge[/b][/color]:/n[color=#369FCF][b]Reporting a PM[/b][/color]:/n[color=#FFFFFF][b]Forum Link to last Post[/b][/color]:/n[color=#369FCF][b]Other Account Issue[/b][/color]:/n[color=#FFFFFF][b]Detailed Description / Include screenshots[/b][/color]:');
    }
});

Thank You.


Last edited by Matikka on Tue 6 Dec - 18:27; edited 1 time in total
Matikka
Matikka
Forumember

Male Posts : 138
Reputation : 3
Language : English
Location : United Kingdom

http://www.Stars-Clan.Forumotion.co.uk

Back to top Go down

Solved Re: Custom form Tutorial - Script not working

Post by SLGray Tue 6 Dec - 11:16

You typed the wrong code for line breaks.

/n should be \n.


Custom form Tutorial - Script not working Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Custom form Tutorial - Script not working

Post by Matikka Tue 6 Dec - 16:36

Sorry would have replied sooner but Internet has been down all day for Maintenence, I changed the line break to the one you stated and the text still dosen't show in the text box
Matikka
Matikka
Forumember

Male Posts : 138
Reputation : 3
Language : English
Location : United Kingdom

http://www.Stars-Clan.Forumotion.co.uk

Back to top Go down

Solved Re: Custom form Tutorial - Script not working

Post by Draxion Tue 6 Dec - 17:10

Hey there,

Do you have your JavaScripts enabled?
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

Solved Re: Custom form Tutorial - Script not working

Post by Matikka Tue 6 Dec - 17:40

Yes,
Java is enabled.
Matikka
Matikka
Forumember

Male Posts : 138
Reputation : 3
Language : English
Location : United Kingdom

http://www.Stars-Clan.Forumotion.co.uk

Back to top Go down

Solved Re: Custom form Tutorial - Script not working

Post by Draxion Tue 6 Dec - 17:43

And you are sure you linked the correct topic number with this?

Code:
?f=30&mode=newtopic

Like this topic, for example, is '43'. so it would be '?f=43&mode=newtopic'
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

Solved Re: Custom form Tutorial - Script not working

Post by Matikka Tue 6 Dec - 17:45

Yes,
mine is '?f=30&mode=newtopic'
Matikka
Matikka
Forumember

Male Posts : 138
Reputation : 3
Language : English
Location : United Kingdom

http://www.Stars-Clan.Forumotion.co.uk

Back to top Go down

Solved Re: Custom form Tutorial - Script not working

Post by Matikka Tue 6 Dec - 18:27

This has now been solved.

Thank You @Draxion
Matikka
Matikka
Forumember

Male Posts : 138
Reputation : 3
Language : English
Location : United Kingdom

http://www.Stars-Clan.Forumotion.co.uk

Back to top Go down

Solved Re: Custom form Tutorial - Script not working

Post by Draxion Tue 6 Dec - 18:28

You're very welcome!
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

Solved Re: Custom form Tutorial - Script not working

Post by SLGray Tue 6 Dec - 20:14

Problem solved & topic archived.
Please read our forum rules: ESF General Rules


Custom form Tutorial - Script not working Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum