Web Form Builder - I want to change a...

User 3004957 Photo


Registered User
866 posts

I am exporting to MySql on my server (not S drive)

Currently, when I export the form it creates a field called '_rowid_'

I want to change this so it creates a field called 'id'

That is the only change, all its db types & php types can remain the same (integer, varchar.....etc)

I want to replace the field _rowid_ with a field called id.

This is not a one off, I need the field to be 'id' every time someone submits a form.

Has anyone already done this (or something similar).

Appreciate any kind advice anyone can give.
User 187934 Photo


Senior Advisor
20,267 posts

You can either write your own myfromname.php to process the data or alter the scripts that are generated by the form builder.
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 3004957 Photo


Registered User
866 posts

Hi Eric,
Which scripts generated by the form builder would i have to alter?
Is it just a case of searching for all elements that are '_rowid_' & replacing them with 'id'
User 187934 Photo


Senior Advisor
20,267 posts

Yes, you should be able to do that. I think it's on the datasavemysql.cls.php starting at about line 100. There's a few spots to change. I haven't tested it. I will if I get a chance tomorrow.;)
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 3004957 Photo


Registered User
866 posts

Hi Eric,

Thanks for the input:)

I just had a peak at the code for datasavemysql.cls.php and it revealed a variety of variations of rowid
_rowid_
rowids
_rowid
_rowids
rowid

Is it the case that I change all of them or just _rowid_

I also had a peruse around the other php files & I also found variations of rowid in the following:

datareporter.cls.php
datasave.cls.php
formpage.cls.php

Now this has kinda raised a dew more questions in my mind:

Do I just change the parameter _rowid_ & ignore all the others?
Do I change all variations to id, preserving any underscores that were used with rowid?
Do I change all or any rowid in only datasavemysql.cls.php or do I make the change in all php files that has row id?

As I said previously, I am only interested in _rowid_ in mysql being changed to id.

Apologies if this has become a tedious question but, I really need to integrate CoffeeCup web form builder into an existing database with the integer of id.

Appreciate any helpful advice you can give.
User 187934 Photo


Senior Advisor
20,267 posts

I didn't have time to look at all the pages last night but it should be changed everywhere.
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 3004957 Photo


Registered User
866 posts

Ok gotcha,

One further question if i may, does that include all the variations:
_rowid_
rowids
_rowid
_rowids
rowid

Or just _rowid_
User 187934 Photo


Senior Advisor
20,267 posts

I would have to look and see. The obvious ones are the _rowid_ the others may or may not.
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 3004957 Photo


Registered User
866 posts

Well, I just try to replace _rowid_ in 4 forms where it is used:

datasavemysql.cls
datareporter.cls
datasave.cls
dataaccesssqllite.cls

Then when try to submit form I receive the following errors;

Your form could not be submitted for the following reason(s):
Failed to execute query associated to this form.
Failed to execute query associated to this form.
Failed to store the data.
Failed to execute query associated to this form.

I am replacing _rowid_ with id

I think it is because I am not using a leading underscore why it is failing :(

I think I will have to find another solution for this project, it is a pity because I love the CoffeeCup form builder
User 187934 Photo


Senior Advisor
20,267 posts

Why not write your own forname.php to process the data?
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

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.