Hi There,
A bit of a noobish question, but you all seem like friendly people !
I'm just testing out Chronoforms for a few things, and this submit content form is fantastic! however I would like to simply put "anonymous" as a default value in the name field, so users can just ignore it if they want, but a value will still be added to the database. Here is the current code I copied from the form
I'm not quite sure where or how to add this in.
The second question, is I would like the publish and front page values to both be set true when this is submitted, so it doesn't have to be moderated.. it just goes live straight away.
Appreciate the help or pointers on how I can learn this myself.
-Tom
A bit of a noobish question, but you all seem like friendly people !
I'm just testing out Chronoforms for a few things, and this submit content form is fantastic! however I would like to simply put "anonymous" as a default value in the name field, so users can just ignore it if they want, but a value will still be added to the database. Here is the current code I copied from the form
<div class="form_item"><div class="form_element cf_textbox"><label class="cf_label">Your name:</label><input class="cf_inputbox required validate-alpha" maxlength="15" size="30" id="text_7" name="created_by_alias" type="text"><a onclick="return false;" class="tooltiplink"><img src="components/com_chronocontact/css/images/tooltip.png" class="tooltipimg" width="16" border="0" height="16"></a><div class="tooltipdiv">Your name: :: Your nickname as you like it to appear with the story!</div></div><div class="clear"> </div></div>
I'm not quite sure where or how to add this in.
The second question, is I would like the publish and front page values to both be set true when this is submitted, so it doesn't have to be moderated.. it just goes live straight away.
Appreciate the help or pointers on how I can learn this myself.
-Tom
Hi Tom,
Add a 'value' attribute to the text input
Bob
Add a 'value' attribute to the text input
<input class="cf_inputbox required validate-alpha" maxlength="15" size="30" id="text_7" name="created_by_alias" type="text" value='anonymous' />
Bob
Fantastic, thankyou. Also, I have figured out the published/front page stuff myself.
One more question, is there a way to change the input text box to a simple text box, rather than the one with all the html editing stuff?
Here is the code
Thanks again for your help!
One more question, is there a way to change the input text box to a simple text box, rather than the one with all the html editing stuff?
Here is the code
<div class="form_item"><div class="form_element cf_textarea" style="width:600px;"><label class="cf_label">Story body:</label>
<?php
$editor =& JFactory::getEditor();
echo $editor->display( 'fulltext', '' , '80%', '350', '55', '20', false ) ;
?>
</div>
Thanks again for your help!
Hi Tom,
use a normal text area instead:
Regards
Max
use a normal text area instead:
<textarea name="fulltext"></textarea>
Regards
Max
Does the value="sometext" trick work with textareas as well?
Edit: I know it doesn't work just by adding the value="", but is there some way to get some text in there, perhaps greyed-out or something?
Edit: I know it doesn't work just by adding the value="", but is there some way to get some text in there, perhaps greyed-out or something?
Hi stmoist,
No, textareas don't have a value attribute but you can put a default entry between the tags
Bob
No, textareas don't have a value attribute but you can put a default entry between the tags
<textarea . . .>'Some text here</textarea>
Bob
Wow, just as I was editing my previous post. Thank you very much for the prompt response!
Edit again: Is there any way to make it so that the text disappears as soon as the textarea is active/highlighted?
Edit again: Is there any way to make it so that the text disappears as soon as the textarea is active/highlighted?
Hi stmoist,
You could do it easily with a little JavaScript - here's one solution courtesy of Google.
Bob
You could do it easily with a little JavaScript - here's one solution courtesy of Google.
Bob
This topic is locked and no more replies can be posted.