form not submitted because FieldA...

User 345797 Photo


Registered User
48 posts

As in write my own update to the DB script? Shouldn't the software be able to handle this?

FYI
I just checked my error log and I got the following:
<?php echo 'Access denied.'; exit(); ?>
Tue, 12 Apr 2016 14:22:48 +0000: Missing pricer method: dropdown_
Tue, 12 Apr 2016 14:22:48 +0000: Missing pricer method: radiogroup_
Tue, 12 Apr 2016 14:22:48 +0000: Missing pricer method: radiogroup_
Tue, 12 Apr 2016 14:22:48 +0000: Missing pricer method: radiogroup_
Tue, 12 Apr 2016 14:22:48 +0000: Missing pricer method: radiogroup_
Tue, 12 Apr 2016 14:22:48 +0000: Missing pricer method: radiogroup_
Tue, 12 Apr 2016 14:22:48 +0000: Missing pricer method: radiogroup_
Tue, 12 Apr 2016 14:22:48 +0000: Missing pricer method: radiogroup_
Tue, 12 Apr 2016 14:22:48 +0000: Missing pricer method: checkbox_
Tue, 12 Apr 2016 14:22:48 +0000: Missing pricer method: checkbox_
Tue, 12 Apr 2016 14:22:48 +0000: Missing pricer method: checkbox_
Tue, 12 Apr 2016 14:22:48 +0000: Missing pricer method: checkbox_
Tue, 12 Apr 2016 14:22:48 +0000: Missing pricer method: checkbox_
Tue, 12 Apr 2016 14:22:48 +0000: Failed to get config parameter: google
Tue, 12 Apr 2016 14:22:48 +0000: Failed to get config parameter: authorizenetsim
Tue, 12 Apr 2016 14:22:48 +0000: Failed to get config parameter: 2co

I don't use the payments option drop down on the form which is what I presume it is looking for although they are sent to paypal after the form is completed. Interesting is that there are 13 fields in the payment_rules in form.cfg before the names of my drop down fields (which I didn't change).

I don't know what the access denied is about because fields are written to the DB.

Then there is the failed to get config parameter lines. Again I have no idea what that means.

Do you?
I am going to open a support ticket about this.

User 187934 Photo


Senior Advisor
20,271 posts

Ok, but I don't see how CC is responsible for a form that has been altered. Good luck.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 345797 Photo


Registered User
48 posts

I have successfully updated the DB from the drop downs. To do so I had to change the form.cfg.php file and include the values that were added programmatically in the rules section by hand. Of course this begs the question about how to do this on the fly. I am trying to create a web site that does not need to be developer intensive. The goal is to use values already maintained in the database, which are the most current, for the drop down. If someone has to go into either the form builder to add each option for each field every time there is a change or (if the drop down is generated on the fly), into the form.cfg.php to add those same values it defeats the purpose, not to mention makes it difficult to keep the data in the drop downs up to date. The values are in a database already, why not be able to use them?

Having said that, I appreciate the help I find on this forum.

Do you have any ideas how to modify the form.cfg.php safely? Is it even a good idea? Is there an other way to approach this problem?
User 187934 Photo


Senior Advisor
20,271 posts

I write my own database insert scripts for my forms. I use the formbuilder to build great looking responsive forms in just a few clicks.
It may be the way your doing things. Did you try making a form with a dropdown that's required and no options added?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 345797 Photo


Registered User
48 posts

Yes, I have tried it with required. It does require one option value in the form. Then I added enough option fields to equal the number of option fields that will be loaded and that didn't work. Then I changed the name of the form to be lower case the same as in the form.cfg.php file and that didn't work. And then I removed all the option fields and that didn't work. In all of these the load of the drop down works, but I get

field doesn't have a valid value error message.

Interestingly enough the rules section for the option list looks like this:

"monprogram1":{"fieldtype":"dropdown","required":true,"values":[""]} or with an empty [] if the field was empty.

So I am back to adding the info into the form.cfg.php.

A couple of questions.
Do you know where CC is getting it's information to update the DB. For example, I always assumed it went to the field and pulled the info from there, but from what is happening for radio buttons, check boxes and drop downs it appears to get it from the rules file.

How would I override the CC DB update scripts? Is it possible to override some and not all? For example, use CC for creating the table if it's not there, but do my own insert?

Do you have any idea why the field names in the rules are lower case, even if the field name in the form is lower and upper case? From earlier experiments, the rules will not give an invalid value if the field is in lower case.

By the way, I changed my code to use the pdo code you had from an earlier post about creating drop downs and it is so much nicer. Thank you for posting that.
User 187934 Photo


Senior Advisor
20,271 posts

No don't add any options. Just let your php dynamic code create them in the dropdown.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 345797 Photo


Registered User
48 posts

I my code does.

How do you over ride the CC updates with your own insert php?
User 187934 Photo


Senior Advisor
20,271 posts

To get the form builder to ignore your dynamic dropdown values
you can delete each of the values part for each dropdown from the form.cfg.php
,"values":[""]
You could also write some code to dynamically add them.
Here's the query that I put in an includes folder outside the form folder so it doesn't get overwritten.
This is the select1.php
<?php
include('pdo_connect.php');
$query1 = $pdo->prepare("SELECT select1 FROM dynamic_dropdown ORDER BY select1");
$query1->execute();
foreach ($query1->fetchAll(PDO::FETCH_ASSOC) as $row) {
$select1_array[] = $row['select1'] ;
}
$select1_array = str_replace('"', '', $select1_array);
$select1_array = str_replace("'", "\'", $select1_array);
echo '"'.implode(', ', $select1_array).'"';
?>

Then in the form.cfg.php file you do this.
{"select1":{"label":"Select an option","fieldtype":"dropdown","required":true,"values":["",<? include('../../includes/select1.php');?>]}

Do this for each select.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 345797 Photo


Registered User
48 posts

Eric,
You are a gold mine of information. I will give that a whirl and let you know.

Thank you.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.