hi,
firstly i appologise for such a newbie type question.
i know ChronoForms can post forms to articals and i have downloaded the submitcontent file and had a look at it, it works fine on its own but when i try something similar my self, it will create an article but there is no title section category etc, the whole article is blank but the email sents perfectly fine will all the form questions and user answers.
i have had a look alot of posts on here and thought i had it all figured out, but i was wrong, i just cannot work out where i am going wrong. i must admit that i know absolutly nothing about PHP coding so it was all a shot in the dark.
here is the form i made via the form wizard
after looking and alot of posts i came up with this code for "on Submit code - after sending email:"
Enable Data Storage: Yes
Table Name(s): joomla_content
Everything else is set the same as submitcontent withthe exception of the form name. i am guessing i am missing something somewhere but i just cannot see where. i am not expecting anyone to do it forme but if somone could point me in the right direction, it would be very appreciated.
if anything is wrong i can guess it will be with the on submit code. after 6 hours i realise i do need some pointers with this
firstly i appologise for such a newbie type question.
i know ChronoForms can post forms to articals and i have downloaded the submitcontent file and had a look at it, it works fine on its own but when i try something similar my self, it will create an article but there is no title section category etc, the whole article is blank but the email sents perfectly fine will all the form questions and user answers.
i have had a look alot of posts on here and thought i had it all figured out, but i was wrong, i just cannot work out where i am going wrong. i must admit that i know absolutly nothing about PHP coding so it was all a shot in the dark.
here is the form i made via the form wizard
<div class="form_item">
<div class="form_element cf_heading">
<h1 class="cf_text">TeleTubbies Application Form</h1>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_text"> <span class="cf_text">Please fill out all required fields below as full as you can</span> </div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 300px;">Character Name</label>
<input class="cf_inputbox required validate-alpha" maxlength="150" size="70" id="text_2" name="name" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 300px;">Email Address</label>
<input class="cf_inputbox required validate-email" maxlength="150" size="70" id="text_3" name="email" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 300px;">ffxiah.com Profile (has to be up-to-date, optional)</label>
<input class="cf_inputbox validate-url" maxlength="150" size="70" id="text_4" name="profile" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_text"> <span class="cf_text">All questions below must be answered in order to subit your application</span> </div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 300px;">What 75+ jobs do you have? </label>
<textarea class="cf_inputbox required" rows="3" id="text_6" cols="55" name="jobs"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 300px;">What relevent subjobs do you have?</label>
<textarea class="cf_inputbox required" rows="3" id="text_7" cols="55" name="subs"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 300px;">Which part of the world are you from?</label>
<input class="cf_inputbox required validate-alphanum" maxlength="150" size="70" id="text_8" name="location" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 300px;">How often are you available during EU prime time (5pm-11pm GMT)?</label>
<input class="cf_inputbox required validate-alphanum" maxlength="150" size="70" id="text_9" name="playtime" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 300px;">Do you know anyone in the shell? Did someone refer you to apply to TT?</label>
<input class="cf_inputbox required validate-alpha" maxlength="150" size="70" id="text_10" name="ref" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 300px;">Can u tell us how your merits look? you can link us to your ffxiah.com merit profile if its updated.</label>
<textarea class="cf_inputbox required" rows="7" id="text_11" cols="55" name="merits"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 300px;">Do you have any prior leading skills? Were you ever a sac or ran a group of of any sort? </label>
<textarea class="cf_inputbox required" rows="3" id="text_13" cols="55" name="ldr"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 300px;">Why do you want to join TeleTubbies? What are you looking for?</label>
<textarea class="cf_inputbox required" rows="4" id="text_14" cols="55" name="whyus"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 300px;">What can you offer us/bring to TT? (and yes, bribes are welcomed!)</label>
<textarea class="cf_inputbox required" rows="5" id="text_15" cols="55" name="offer"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 300px;">If a mob can't be slept and it links, what should be done? Give us a perspective via your main job that you like.</label>
<textarea class="cf_inputbox required" rows="7" id="text_16" cols="55" name="situation"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 300px;">Whats your favorite event in the game, and why?</label>
<textarea class="cf_inputbox" rows="5" id="text_17" cols="55" name="event"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 300px;">Tell us more about you? Whats your favorite movie, music, etc. anything non FF related...for the love of god tell us you have a RL.</label>
<textarea class="cf_inputbox required" rows="5" id="text_18" cols="55" name="personal"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 300px;">A Galka, Mithra, Hume, Tarutaru, and Elvaan are stranded together on a desert island. Explain what happens next.</label>
<textarea class="cf_inputbox required" rows="7" id="text_19" cols="55" name="desert"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 300px;">What has been your best memory/experience of FFXI so far?</label>
<textarea class="cf_inputbox required" rows="5" id="text_20" cols="55" name="memory"></textarea>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_text"> <span class="cf_text">Please make sure that all the required fields (the one's that are not stated as optional) are filled out to the best you can. When you are ready to submit your application, please click apply</span> </div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_button">
<input value="Apply" name="button_24" type="submit" />
</div>
<div class="cfclear"> </div>
</div>
after looking and alot of posts i came up with this code for "on Submit code - after sending email:"
<?php
$_POST['catid'] = '7';
$_POST['id'] = '';
$_POST['sectionid'] = '4';
$_POST['state'] = '1';
$_POST['created'] = date("Y-m-d H:i:s");
?>
<?php
$_POST['created_by_alias'] = .$_POST['name'];
?>
<?php
$_POST['title'] = 'Application: '.$_POST['name'];
?>
<?php
$_POST['introtext'] = 'Character Name<br />'.$_POST['name'].'<br /><br />ffxiah.com Profile (has to be up-to-date, optional) <br />'.$_POST['profile'].'<br /><br />What 75+ jobs do you have? And any relevent subjobs <br />Jobs 75+: '.$_POST['jobs'].'<br />Subjobs: '.$_POST['subs'].'<br /><br />Which part of the world are you from? How often are you available during EU prime time (5pm-11pm GMT)?<br />Location: '.$_POST['location'].'<br />Play Time: '.$_POST['playtime'].'<br /><br />Do you know anyone in the shell? Did someone refer you to apply to TT? <br />'.$_POST['ref'].'<br /><br />Can u tell us how your merits look? you can link us to your ffxiah.com merit profile if its updated. <br />'.$_POST['merits'].'<br /><br />Do you have any prior leading skills? Were you ever a sac or ran a group of of any sort? <br />'.$_POST['ldr'].'<br /><br />Why do you want to join TeleTubbies? What are you looking for? <br />'.$_POST['whyus'].'<br /><br />What can you offer us/bring to TT? (and yes, bribes are welcomed!) <br />'.$_POST['offer'].'<br /><br />If a mob can't be slept and it links, what should be done? Give us a perspective via your main job that you like. <br />'.$_POST['situation'].'<br /><br />Whats your favorite event in the game, and why? <br />'.$_POST['event'].'<br /><br />Tell us more about you? Whats your favorite movie, music, etc. anything non FF related...for the love of god tell us you have a RL. <br />'.$_POST['personal'].'<br /><br />A Galka, Mithra, Hume, Tarutaru, and Elvaan are stranded together on a desert island. Explain what happens next. <br />'.$_POST['desert'].'<br /><br />What has been your best memory/experience of FFXI so far? <br />'.$_POST['memory'];
?>
Enable Data Storage: Yes
Table Name(s): joomla_content
Everything else is set the same as submitcontent withthe exception of the form name. i am guessing i am missing something somewhere but i just cannot see where. i am not expecting anyone to do it forme but if somone could point me in the right direction, it would be very appreciated.
if anything is wrong i can guess it will be with the on submit code. after 6 hours i realise i do need some pointers with this
Hi Lightvision ,
You are almost there. There are a couple of typos in the OnSubmit code, a stray . on line 10 and an unescaped ' in the introtext (can't -> can\'t). Try this version:
Bob
PS The BBCode style [b] tags won't work here, you need HTML <b> tags.
You are almost there. There are a couple of typos in the OnSubmit code, a stray . on line 10 and an unescaped ' in the introtext (can't -> can\'t). Try this version:
<?php
$_POST['catid'] = '7';
$_POST['id'] = '';
$_POST['sectionid'] = '4';
$_POST['state'] = '1';
$_POST['created'] = date("Y-m-d H:i:s");
$_POST['created_by_alias'] = $_POST['name'];
$_POST['title'] = 'Application: '.$_POST['name'];
$_POST['introtext'] = 'Character Name<br />'.$_POST['name'].'<br /><br />ffxiah.com Profile (has to be up-to-date, optional) <br />'.$_POST['profile'].'<br /><br />What 75+ jobs do you have? And any relevent subjobs <br />Jobs 75+: '.$_POST['jobs'].'<br />Subjobs: '.$_POST['subs'].'<br /><br />Which part of the world are you from? How often are you available during EU prime time (5pm-11pm GMT)?<br />Location: '.$_POST['location'].'<br />Play Time: '.$_POST['playtime'].'<br /><br />Do you know anyone in the shell? Did someone refer you to apply to TT? <br />'.$_POST['ref'].'<br /><br />Can u tell us how your merits look? you can link us to your ffxiah.com merit profile if its updated. <br />'.$_POST['merits'].'<br /><br />Do you have any prior leading skills? Were you ever a sac or ran a group of of any sort? <br />'.$_POST['ldr'].'<br /><br />Why do you want to join TeleTubbies? What are you looking for? <br />'.$_POST['whyus'].'<br /><br />What can you offer us/bring to TT? (and yes, bribes are welcomed!) <br />'.$_POST['offer'].'<br /><br />If a mob can\'t be slept and it links, what should be done? Give us a perspective via your main job that you like. <br />'.$_POST['situation'].'<br /><br />Whats your favorite event in the game, and why? <br />'.$_POST['event'].'<br /><br />Tell us more about you? Whats your favorite movie, music, etc. anything non FF related...for the love of god tell us you have a RL. <br />'.$_POST['personal'].'<br /><br />A Galka, Mithra, Hume, Tarutaru, and Elvaan are stranded together on a desert island. Explain what happens next. <br />'.$_POST['desert'].'<br /><br />What has been your best memory/experience of FFXI so far? <br />'.$_POST['memory'];
?>
Bob
PS The BBCode style [b] tags won't work here, you need HTML <b> tags.
i gave it a try and converted the BBcode styling to HTML but unfortunatly its not working.
it is still posting a blank article for some reason
EDIT: never mind, IT WORKS, thank you so much, after i made the change i was using the wrong form, silly me lmao, i guess i need some sleep hehe.
i cant believe how close i was to having it working
i would like to thank you for spotting those mistakes, i really appreciate it.
it is still posting a blank article for some reason
EDIT: never mind, IT WORKS, thank you so much, after i made the change i was using the wrong form, silly me lmao, i guess i need some sleep hehe.
i cant believe how close i was to having it working
i would like to thank you for spotting those mistakes, i really appreciate it.
This topic is locked and no more replies can be posted.