HI there,
Apologies if this has been asked already - I did a search but couldn't find anything.
I'm testing Chronoforms with Joomla 1.0. I have successfully managed to put up a working form, but I cannot see a way to make the page available only to registered users. I can't obviously use the normal Joomla way.
Can anyone please help me?
Many thanks
Apologies if this has been asked already - I did a search but couldn't find anything.
I'm testing Chronoforms with Joomla 1.0. I have successfully managed to put up a working form, but I cannot see a way to make the page available only to registered users. I can't obviously use the normal Joomla way.
Can anyone please help me?
Many thanks
Hi Bob,
Thanks for the reply, but that thread is about
Joomla 1.0 How do I include username and/or email in form
What I require is to make the page only viewable to registered users.
If you could help I would be awfully grateful.
Thanks for the reply, but that thread is about
Joomla 1.0 How do I include username and/or email in form
What I require is to make the page only viewable to registered users.
If you could help I would be awfully grateful.
Hi, use this code:
global $my;
if(!$my->id){
echo "you are not allowed to see this form";
return;
}
at the top of your form code in the HTML code box!
Regards
Max
Regards
Max
HI there,
This doesn't work for me I'm afraid. I put it at the top of the form code but when I visit the page I get:
global $my; if(!$my->id){ echo "you are not allowed to see this form"; return; }
showing above the form.
Here is the form code:
Probably me being stupid but would really appreciate the help.
I tried doing the 'thank you for submitting the form' thing as well and got the same problem where is just printed those words on the form before it had been submitted.
This doesn't work for me I'm afraid. I put it at the top of the form code but when I visit the page I get:
global $my; if(!$my->id){ echo "you are not allowed to see this form"; return; }
showing above the form.
Here is the form code:
global $my;
if(!$my->id){
echo "you are not allowed to see this form";
return;
}
<p class="contentheading">Subscribe to Helicopter Monthly</p>
<p>Please fill out the form below if you would like to subscribe to Helicopter Monthly and we will contact you with further details.</p>
<p>
<label for="sub_name">Name:</label>
<br/>
<input name="sub_name" id="sub_name" type="text" />
</p>
<p>
<label for="sub_address">Address:</label>
<br/>
<textarea name="sub_address" id="sub_address" type="text" /> </textarea>
</p>
<p>
<label for="postcode">Postcode:</label>
<br/>
<input name="sub_pcode" id="sub_pcode" type="text" />
</p>
<p>
<label for="sub_country">Country:</label>
<br/>
<input name="sub_country" id="sub_country" type="text" />
</p>
<p>
<label for="sub_email">Email:</label>
<br/>
<input name="sub_email" id="sub_email" type="text" />
</p>
<p>
<label for="sub_job">Profession:</label>
<br/>
<input name="sub_job" id="sub_job" type="text" />
</p>
<p>
<label for="sub_id">Membership ID</label>
<br/>
<input name="sub_id" id="sub_id" type="text" />
</p>
<p>
<input type="radio" name="subscription_type" value="print"> Printed Version
<br>
<input type="radio" name="subscription_type" value="digital"> Digital Version
</p>
<p>
<input type="submit" value="Submit">
</p>
Probably me being stupid but would really appreciate the help.
I tried doing the 'thank you for submitting the form' thing as well and got the same problem where is just printed those words on the form before it had been submitted.
Hi Xbumble,
We're not doing too well for you here - apologies.
The code shippet needs to be inside <?php . . . ?> tags
Bob
Note to other readers - this is Joomal 1.0.x code and will not work with native Joomla 1.5.x
We're not doing too well for you here - apologies.
The code shippet needs to be inside <?php . . . ?> tags
<?php
global $my;
if ( !$my->id ) {
echo "you are not allowed to see this form";
return;
}
?>
<p class="contentheading">Subscribe to Helicopter Monthly</p>
Bob
Note to other readers - this is Joomal 1.0.x code and will not work with native Joomla 1.5.x
This topic is locked and no more replies can be posted.