Boltforms doesn't see database tables not starting with "bolt_"

Open
#278 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
database

Research direction

Start by reproducing the issue with a manually created boltforms_contact_us table and inspect the table-discovery check that rejects it. Done means Boltforms recognizes manually created tables and saves form submissions without removing the existence check.

Written by the indexing model from the issue text.

Description

I've been playing with the database option to store submission data to a separate table, because I don't want to create a contenttype for that, so I manually created a table named boltforms_contact_us, but it came to my attention that the mechanism Boltform uses to query tables ignores tables created manually and always throws an error missing database table 'boltforms_contact_us', even though it's definitely there and contains all appropriate columns. To check my assumption, I dumped $tables, and indeed the list didn't contain manually created tables and only listed those created by Bolt. As I lack PHP knowledge, I've no idea how to fix this myself and I had to remove the part of code that checks if the table exists. As soon as I did this, the form data successfully started to save to my custom table. So I'll have to leave it like that for now, but I really do hope that this issue will be fixed in future versions.

Dominant language
PHP
Stars
52
Forks
54
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bolt/boltforms

All issues in bolt/boltforms

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.