Gossamer Forum
Home : Products : Links 2.0 : Customization :

Add confirmation for non-templates?

Quote Reply
Add confirmation for non-templates?
Has anyone done the add confirmation for non-templates. I have the mod for the template version but have no idea on how to convert it. TIA!

Quote Reply
Re: Add confirmation for non-templates? In reply to
You edit the codes in the sub site_html_add and sub site_html_add_failure in the site_html.pl file. And to add the confirmation page, you add a subroutine called sub site_html_add_confirm.

You do not have to define tags as written in the Mod instructions. Simply change the name of the submit button codes in the above mentioned subroutines and also add hidden fields in the sub site_html_add_confirm routine.

Regards,

Eliot Lee

Quote Reply
Re: Add confirmation for non-templates? In reply to
Thanks for your quick answer but what you wrote is beyond me. What I'm looking for is if someone has the exact info or mod to cut and paste. I don't know how to create sub-routines, etc.

In Reply To:
You edit the codes in the sub site_html_add and sub site_html_add_failure in the site_html.pl file.
Edit them to what?

In Reply To:
And to add the confirmation page, you add a subroutine called sub site_html_add_confirm.
Where do I get this sub-routine.

In Reply To:
Simply change the name of the submit button codes in the above mentioned subroutines and also add hidden fields in the sub site_html_add_confirm routine.
Huh? :)



Quote Reply
Re: Add confirmation for non-templates? In reply to
In Reply To:
Edit them to what?
Like I mentioned...REPLACE THE SUBMIT BUTTONS from:

Code:

<input type="submit" name="process_form" value="Submit">


to the following:

Code:

<input type="submit" name="send_form" value="Preview Submission">


In Reply To:
Where do I get this sub-routine.
Uh...the site_html.pl file where the other add subroutines are located.

Regards,

Eliot Lee


Quote Reply
Re: Add confirmation for non-templates? In reply to
You said "And to add the confirmation page, you add a subroutine called sub site_html_add_confirm."

I said "Where do I get this sub-routine."

You said "Uh...the site_html.pl file where the other add subroutines are located"

I can't find any sub site_html_add_confirm in site_html.pl



Quote Reply
Re: Add confirmation for non-templates? In reply to
RIGHT...you ADD the sub site_html_add_confirm sub-routine which is used to show the confirmation page. You add the form codes as you have in the sub site_html_add_form routine EXCEPT you use HIDDEN fields rather than TEXT and TEXTAREA fields.

Why aren't you using templates? They are a lot more flexible and easier to use...

Regards,

Eliot Lee

Quote Reply
Re: Add confirmation for non-templates? In reply to
Let's see if I got this right. In sub site_html_add_form and and sub site_html_add_failure I change <INPUT TYPE="SUBMIT" VALUE="Click to Submit"> to <input type="submit" name="send_form" value="Preview Submission">

then I duplicate sub site_html_add_form and rename it to sub site_html_add_confirm and change the TEXT and TEXTAREA fields to hidden fields.

Is this right? If so, I did try it but it submitted as usual. How is the site_html_add_confirm sub called?

Thanks.

Quote Reply
Re: Add confirmation for non-templates? In reply to
Right...but as I mentioned before, I believe, you need to use the following submit button in your sub site_html_add_confirm routine:

Code:

<input type="submit" name="process_form" value="Submit Form">


In Reply To:
How is the site_html_add_confirm sub called?
HAVE you edited the add.cgi file? If so, you should a reference to the sub in your edited add.cgi file. It is called when a clean submission (with no errors) is sent to your server.

Regards,

Eliot Lee

Quote Reply
Re: Add confirmation for non-templates? In reply to
That did it, process_form not send_form. Thanks!

Quote Reply
Re: Add confirmation for non-templates? In reply to
Good...glad you finally got it.

Regards,

Eliot Lee

Quote Reply
Re: Add confirmation for non-templates? In reply to
For anyone else that requires this mod here is a summary:

1. Replace your add.cgi with the one that comes with addconfirm.zip (http://www.asan.com/...oenix/addconfirm.zip).

2. Duplicate the sub site_html_add_form section of site_html.pl (copy and paste it below).

3. Change (rename sub) where it says "sub site_html_add_form" to "sub site_html_add_confirm".

4. In the sub site_html_add_form section change <INPUT TYPE="SUBMIT" VALUE="Click to Submit"> to <input type="submit" name="process_form" value="Submit">

5. In the sub site_html_add_confirm section change the input text and text area fields to hidden fields. For example, change <INPUT NAME="Title" VALUE="$in{'Title'}" SIZE=30> to <INPUT TYPE="hidden" NAME="Title" VALUE="$in{'Title'}">$in{'Title'}.

That's it!

Quote Reply
Re: Add confirmation for non-templates? In reply to
Decent instructions...but 4 and 5 are confusing....

I would recommend adding HIDDEN fields for ALL fields, not just adding value="$in{'FieldName'} to the text input fields in the sub site_html_add_confirm routine.

Regards,

Eliot Lee

Quote Reply
Re: Add confirmation for non-templates? In reply to
Problem is, just putting <INPUT TYPE=HIDDEN NAME="Title" VALUE="$in{'Title'}" SIZE=30> doesn't work. It needs to have $in{'Title'} outside of the tags to show up.

I did eliminate step 6 since this is the same as 5.

Quote Reply
Re: Add confirmation for non-templates? In reply to
Uh...yea it does...That parameter is passed and the record is added if you use HIDDEN fields. Printing $in{'Title'} only shows what you have added...

Regards,

Eliot Lee

Quote Reply
Re: Add confirmation for non-templates? In reply to
Ahh... I get it now! :) Steps have been edited.