Forums

Chronoform Questions...

cb1 19 Jul, 2008
#1 - The chronoform has worked great... though the page is not done yet on the live site, I have tested it on the live site and it works.

#2 - It was my first form project and was huge - an Employment Application.

#3 - My first question is this: My resulting email is giving me results like this:

language1writecheckbox on
language1writefaircheckbox on
language1writegoodcheckbox
stateofregistration1pulldown CO
language1readfluentcheckbox on
language1writecheckbox on

It's not very pretty and the HR person might throttle me...

#4 - Can the results on the left [the "name"] have spaces in them? Or is it better to leave them a string like that?

#5 - I've read about a formatting email? But I don't understand that portion - how does that work and are there examples I can see somewhere? Can I make the results better looking?

I really appreciate the help. This is at the end of a huge project I grossly undercharged for - again - it was my first form project.

Any help is appreciated.

Thanks!
GreyHead 19 Jul, 2008
Hi cb1,

If I understand this correctly then I think that the 'Elements Titles' tab will do what you want. You can make entries there like
language1writecheckbox=Language 1 writing
language1writefaircheckbox=Language 1 writing fair
. . .
Is this enough?

Bob
cb1 19 Jul, 2008
I sort of get what you are doing... you are redefining the existing definitions.

#1 - This is for the submit email corrects? (This is how you make the results look not so code-ish right?)

#2 - Can the email be formatted to resemble the initial form?
Max_admin 19 Jul, 2008
#1- yes, and for the data view page too!
#2- yes, do this yourself through the email template or if you are using J1.5 then wait the next version which has this feature ready!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cb1 29 Jul, 2008
Guys - I'm just not getting a handle on Field Titles for:

1 - Radio buttons
2 - CheckBoxes

----------Radio Button Issue--------


I have a simple yes/no choice - wither you have a previous name or you don't.
My code is here:
  Any Previous Name(s)?
<label for="previousnamesradioyes" style="width:5em;"><input type="radio" name="previousnamesradio" value="yespreviousnamesradio" id="previousnamesradioyes" />Yes</label>
<label for="previousnamesradiono"><input type="radio" name="previousnamesradio" value="nopreviousnamesradio" id="previousnamesradiono" />No</label>


PROBLEM - I don't know how to make Field Titles for this or any other Radio button (and have spent this afternoon trying - or trying to find examples of how to do this.
QUESTION - Is my code set up wrong to begin with?
QUESTION - Can you provide and example of a RADIO BUTTON(s) Field Title(s)

As an example - this is what I get in my form:
previousnamesradio yespreviousnamesradio

But I can't change yespreviousnamesradio to Yes - Previous Name (it's one level deeper than I know how to go)

-------Checkboxe Issue--------

Here is my Checkbox code:
<div style="padding-top:8px;">Check all you would consider working:<br />
<label for="fulltimeregularcheckbox" class="radio"><input name="fulltimeregularcheckbox" type="checkbox"  value="" id="fulltimeregularcheckbox" />Full Time/Regular</label></div>
<div><label for="fulltimetemporarycheckbox" class="radio" style="padding-top:4px;"><input name="fulltimetemporarycheckbox" type="checkbox"  value="" id="fulltimetemporarycheckbox"/>Full Time/Temporary</label></div>
<div><label for="parttimeregularcheckbox" class="radio"><input name="parttimeregularcheckbox" type="checkbox"  value="" id="parttimeregularcheckbox"  class="horzBlock"/>Part Time/Regular</label></div>
<div><label for="parttimetemporarycheckbox" class="radio"><input name="parttimetemporarycheckbox" type="checkbox"  value="" id="parttimetemporarycheckbox"/>Part Time/Temporary</label></div>
 </div>
 


Additionally I have these Field Titles:
fulltimeregularcheckbox=Full Time Regular
fulltimetemporarycheckbox=Full Time Temporary
parttimeregularcheckbox=Part Time Regular
parttimetemporarycheckbox=Part Time Temporary

PROBLEM - The return email returns this (not ALL of which were checked):
Full Time Regular
Full Time Temporary
Part Time Regular
Part Time Temporary

So the Field Titles for that works BUT DOESNT Give me an answer as two which ones were chosen.

So I'm confused on two fronts - both the Radio Buttons and the Check Boxes & I apologize - but I couldn't find anything on the site that I understood to address these two what should be common occurances (I may be the only dolt in code land!)

Can anyone provide some help or more in depth examples?

Thanks for any help - - really appreciate it.
Max_admin 29 Jul, 2008
Hi cb1, why don't use the Email template ??? its made for this advanced templates !!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 29 Jul, 2008
Hi cb1,

I agree with Max that an email template is probably the way to go but I think you can get part way by using values. For the radio box:
<input type="radio" name="previousnamesradio" value="yes" />
<input type="radio" name="previousnamesradio" value="no" />
with Fields Titles of
Previousnamesradio=Previous Names
should do the trick.

Similarly for checkboxes:
<input type="checkbox" name="time[]"  value="full-time" />
<input  type="checkbox"  name="time[]"value="part-time regular" />
with Fields Titles
time=Working hours


Not tested so may be buggy (or not work at all).

Bob
cb1 31 Jul, 2008
Okay - I think I'm following Bob's last post... haven't tried it yet (walking out to a meeting momentarily).

BUT I am not following the Email Template comment...

I thought I:
#1 - Created a form - which I have
#2 - Created Field Titles - which I'm in the middle of
#3 - Created an html email - which I have yet to begin (call it the last frontier)

Again - I'm new to all this - so I apologize.

Isn't #3 essentially an email template?

Is there an easier way that I'm not following?

Lemme know!
Thanks!
GreyHead 31 Jul, 2008
Hi cb1,

No magic here. The email template lets you use any combination of html and PHP so you can construct a report that looks exactly the way that you want it. Probably simpler than fine-tuning the field titles.

Bob
cb1 31 Jul, 2008
Keeping in mind my form is huge (a 3 page employment application):

QUESTION: You are saying (or implying) I can essentially eliminate my Step #2 (Create Field Titles) by how I code Step #3 (Create an HTML email).

It will take me time to learn how to do that - but if I am reading you correctly - I'd rather spend the time learning how to eliminate the Step #2 by incorporating it into Step #3

(as Step #2 could take me the rest of the week).

Question: Is my theorizing correct on this?

Thanks for the time you are taking to help me with this. I really appreciate it.
Max_admin 31 Jul, 2008
cb1, get your form code, replace all fields with {field_name}, this is an email template, add it to the Email template field and it will work, be sure to make the email type "template" at the general tab, its near the bottom!

next version will generate full email templates auto. with wysiwyg

cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cb1 01 Aug, 2008
Wow guys...

I'm beginning to understand it all - I've gotten some test radio buttons to work and some test checkboxes to work... I still have a long road ahead of me but am understanding the basics...

QUESTION: Is there a way I can STYLE the return email form WITHOUT coding every answer to include an in-line style using
<span>{name}</span>
? Meaning is there any way to attach a style sheet?

I want all the answers to come back as dark grey italicized text. Is there a general class for this?

Thanks!
GreyHead 01 Aug, 2008
Hi cb1,

Sure, to start with I'd add a style block to the template; when that's looking abotu Ok then I'd think about saving it as a separate .css file and linking it back in to the template.

There are several good css tutorials around. The block will look something like
<style type="text/css">
div.answer {
  color:grey; 
  font-style:italic; 
  font-weight:bold;
}
  . . .
</style>

Bob
cb1 01 Aug, 2008
Is the word "answer" as in your example an generic html term that the form will understand?

Meaning does "answer" style every answer in parentheses as a general html rule? Without me naming every div "answer"?

Your example looks like I have to name every div "answer" and I have probably 60 to 80 div's.

Thats the same as inline styling every div.

Unless I'm reading it wrong.
GreyHead 01 Aug, 2008
Hi cb1,

I'm afraid that there's nothing magic about 'answer'. You'll need to look up the css but IIRC correctly you could do something like 'div.myform div' - or just use search and replace on the code block to replace <div with <div class="answer"
cb1 01 Aug, 2008
No sweat - I just wanted to make sure before I dove in...

Thanks for all the patience and help.
GreyHead 01 Aug, 2008
Hi cb1,

Making long forms (or answer sheets) can be really tedious. If I can I use PHP to carry the repetitive work. For example, from a recent project, here's a function to create an input box
function inputText( $label, $name, $required = false, $value="", $id = "" ) {
    
    global $result_array;

    if ( !$id ) {
        $id = $name;
    }
    // set class required or optional
    if ( $required ) {
        $class = 'required';
    } else {
        $class = 'optional';
    }
    if ( !$value ) {
        $value = $result_array[$name];
    }
    echo "<div><label for='$name' class='$class' >$label</label>";
    echo "<input name='$name' type='text' id='$id' value='$value' ></div>";
}

then when I need an input box it only takes one line to create each box:
echo inputText('Address', 'address1', true );
echo inputText('', 'address2', true );
echo inputText('City', 'city', true );
echo inputText('State', 'state', true );
echo inputText('Zip', 'zip', true );
echo inputText('Country', 'country', true );

and if I need to add something to all the boxes then I can do it once in the function instead of fifty times in the html.

Bob
This topic is locked and no more replies can be posted.