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 December 6th 2016, 12:48 am

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 December 6th 2016, 7:27 pm; 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 December 6th 2016, 12:16 pm

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 : 51537
Reputation : 3519
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 December 6th 2016, 5:36 pm

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 December 6th 2016, 6:10 pm

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 December 6th 2016, 6:40 pm

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 December 6th 2016, 6:43 pm

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 December 6th 2016, 6:45 pm

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 December 6th 2016, 7:27 pm

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 December 6th 2016, 7:28 pm

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 December 6th 2016, 9:14 pm

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 : 51537
Reputation : 3519
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