Try to Republish problem

caratti 23 Mar, 2013
I have a Multi page form and I noticed that if I configure some page of the form to "Try to Republish if Error occurred" the field content is not showed. See code below:

<div class="form_item">
<input id='Q18_00' type='text' maxlength='30' size='30' name='Q18_00' value="<?php echo 'This is not showed with Try to Republish' ?>" />
</div>

This code works well if the form page is configured to Don’t Republish. I mean, the value 'This is not showed with Try to Republish” is showed as expected if I set the “Republish fields if error occured” parameter to “Dont Republish”.
But if I set “Republish fields if error occured” parameter to “Try to Republish” a blank input text field is showed.
GreyHead 23 Mar, 2013
Hi caratti,

I don't understand what you are trying to do here? Why would you use a PHP echo statement to add a text value like that?

My guess is that in the form data that ChronoForms has Q18_00 is empty so that republishing an empty input is correct.

Bob
caratti 23 Mar, 2013
Actually I used php echo with a database table data. See the real code:

<td>
<input id="Q18_01_recepcao" name="Q18_01_recepcao" type="text" value="<?php echo $row->Q18_01_recepcao;?>" maxlength="6" size="6" onkeypress="return noenter(event)" />
</td>

I switched it to a cosntant string to debugging process and to be more didactic.
I would like to show you that the content of value attribute is not showed when I use the Try to Republish option.
It happens whith php echo command and also constant string (for example value="xyz").

The fact is that the value assigned content (value="xyz" or value="<?php echo 'xyz';?>" or anything else) is not displayed in the edit box as expected.

That is happening when I am working with "Try to Republish" functionality.
I need "Try to Republish" function because I have server validation in this page.

I am using Joomla 1.5.22 and the last download of ChronoForms.
My form has 9 pages (Multi Page Plugin).
I am talking about the third page, but it occurs in others pages that I configure to "Try to Republish"


Thanks.
Max_admin 24 Mar, 2013
Hi caratti,

I have just answered in the other topic!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
caratti 25 Mar, 2013
Hi Max,
what topic did you answer?
Are you talking about upgrade my Chronoforms?
If yes, I ca not do that for while.

Thanks.
Ricardo.
Max_admin 25 Mar, 2013
Hi Ricardo,

Well, you may do it manually then, disable the try to republish and set the value of fields manually using PHP, this will become annoying when you have dropdowns:

for text boxes:

value="<?php echo !empty($_POST['field_name']) ? $_POST['field_name'] : ''; ?>"


for checks and radios:

<input type="checkbox" <?php echo !empty($_POST['field_name']) ? 'checked="checked"' : ''; ?>" name="" ... />


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
caratti 25 Mar, 2013
Hi Max.
Thanks again for the attention.
Yes. I did it manually.
But, if you see my first and second post, you will observe that in my case, your advise will not work.
I mean,
even if you use a constant string, instead of a command php (ex.: value="XYZ"), my form does not work as expected.
XYZ does not appear in input text box.

If I switch from "Try to Republish" to "Dont Republish" my forms works (with the drawback that all the fields are cleared when an error is found during server validation process).

I would venture to say that the attribute value = "XZY", from input command, is compulsorily ignored in some cases, when "Try to Republish" is set.
Yes in some cases. Very puzzling. isn't?

Best regards.
Ricardo.
Max_admin 26 Mar, 2013
Hi Ricardo,

When you leave the "Try to republish" enabled, maybe it resets the fields values, you have to disable it completely and republish all fields manually for this form, or simply use V4

Unfortunately there is no other way to fix this, you may also try to install V4 with V3 (they can work together but you will need to switch the status of the "Mootools upgrade" plugin every time you access the wizard of the other one).

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
caratti 26 Mar, 2013
Thanks Max.
I think you show me the way.
I will try do that.
By the way, the new version is very different from the previous one. I'm having trouble using it. I do not like using the wizards. My forms are too long to use this feature.

Best Regards.
Ricardo Caratti.
Max_admin 01 Apr, 2013
Hi Ricardo,

You can still build your own form using own code in the new version, simply click "new" then create your form using your code, but then you have to go to the wizard to add actions..etc 🙂

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.