Buy Now
Sign in

A few issues..

Lord Meshadieme , September 04 2010, 12:24
L
Lord Meshadieme 8
September 04 2010, 12:24 #57079
Hello,

I'm trying to develop a site to showcase swf files that the users will submit, this is my first attempt of using joomla and chronoform and i am starting like it. Here's the 'but', two issue are problematic so far.

1) I've used the hidden field method to display variables in the forms from the joomla user database like so


<?php
// Get user-information from Joomla
$user = &JFactory::getUser();
?>
<input type="hidden" name="usersname" id="usersname" size="20"
maxlength="40" value="<?= $user->username; ?>" />


and i use the {usersname} tags in the email template to display the field in the emails sent. The wierd thing is that only the {emailadd} tag is working, while the username and name are not. what is wrong here?

2) The second issue is i can't seem to think of a way to dynamically, call the "display swf file" page. i mean i won't have to create individual pages each time a new entry is added obviously. So far i've used ChrnoConnectivity to Show a "Listing" of all the swf's. and i want them to clickable to direct it to ONE form which dynamically loads the correct swf and other information from the database. So the first issue how would the "which swf" variable be passed through the page, and how to make the next page, technically it's still using a database link so chronoconnectivty might do it. So how do i go about this.

Regards,
Lord Meshadieme
GreyHead 65
September 04 2010, 13:45 #57083
Hi Lord Meshadieme,

The username code looks OK. It will only work if the user is logged in though.

If you turn on Debug in the form General tab you can see what info is being submitted.

To select a particular swf you'll need to pass some kind of 'id' so that you can look it up. If you created your tables with ChronoForms this would usually be the cf_id - basically you add &cf_id=999 to the url.

Bob
If you'd like to buy me a coffee or two, thank you very much
L
Lord Meshadieme 8
September 04 2010, 23:25 #57102
Yeah i do have Debug Mode on,

this is what i have in the email template.


username: {usersname}

devname: {devsname}

email: {emailadd}


and this is what i get in the email sent



username: {usersname}

devname: {devsname}

email: administrator@****.com



and this is what i have in the html.


<input type="hidden" name="usersname" id="usersname" size="20"
maxlength="40" value="<?= $user->username; ?>" />
<input type="hidden" name="devsname" id="devsname" size="20"
maxlength="40" value="<?= $user->name; ?>" />
<input type="hidden" name="emailadd" id="emailadd" size="20"
maxlength="40" value="<?= $user->email; ?>" />


so what am i doing wrong.

oh and i forgot to mention the POST and FILE are correct, and the database has the correct values for the field its only in the email that there is a problem accessing the variables, thats why its weird since the email variables is accessible.
GreyHead 65
September 05 2010, 09:20 #57105
Hi Lord Meshadieme,

Hard to tell without seeing more. If the value is correct in the $_POST array then it should pass through to the Email template. It's a simple search and replace.

Bob
If you'd like to buy me a coffee or two, thank you very much
L
Lord Meshadieme 8
September 07 2010, 19:01 #57262
For others who come across the same issue, i managed to solve it using the Wizard's own hidden fields of course the php tags weren't usable but after creation of the fields u can edit the value of the hidden fields from the "Form Code" tab which allowed the email template to access the variables.

Thank you Grey Head i also managed to get the dynamic form through the URL forwarding and Request statement in the WHERE SQL on a new ChronoConnectivity form. Now all that's left is formatting the pages to my liking and adding comments if that is possible.