Adding field in btemaillistsignup

Permalink Browser Info Environment
hi jordanlev, thanks for the package! (^_^)

btw, i install your package and want to add one field in btemaillistsignup called 'template',
its just color list.

i know there is template fitur already. but i think this is defferent purpose.

i added field in table, it working fine when adding the block,
but for edit block, the form is missing, there is only submit and cancel button. no error?

where i am missing?

nb: i turn it back to the beginning

Type: Discussion
Status: New
fastcrash
View Replies:
jordanlev replied on at Permalink Reply
jordanlev
Do you want to add a field for when you add/edit the block (for the site admin), or do you want to add another field to the signup form (for list signups)?

If you want to add fields to the block (for the site admin), you need to do all of the following:

* Add field to the table
* Refresh the schema (Dashboard -> Add Functionality -> click "Edit" next to "Email List Signup", click "Edit" over to the right, click "Refresh")
* Add html fields to form.php so it can be edited, for example:
<tr>
<td align="right">
<?php echo $form->label('fieldName', 'Label For The Field:'); ?>
</td>
<td align="left" class="field">
<?php echo $form->text('fieldName', $fieldName); ?>
</td>
</tr>



If you want to add another field to the form (in addition to the "Email Address" field that's there now), it's a little more complicated. Let me know if this is what you want to do and I'll give you instructions.

-Jordan
fastcrash replied on at Permalink Reply 1 Attachment
fastcrash
it throw this error when i try it:
Warning: include(2) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\www.concrete5.com\concrete\libraries\block_view.php on line 297
Warning: include() [function.include]: Failed opening '2' for inclusion (include_path='.;C:\xampp\php\PEAR;C:/xampp/htdocs/www.concrete5.com/libraries/3rdparty;C:\xampp\htdocs\www.concrete5.com\concrete\config/../libraries/3rdparty') in C:\xampp\htdocs\www.concrete5.com\concrete\libraries\block_view.php on line 297


i added field
<field name="template" type="X" />

to the btEmailListSignup db.xml, couse if i added in phpmyadmin, it will remove when i hit refresh button.

the edit form still missing? it's weird the first time its work but now missing again and throw error. it's cache?
jordanlev replied on at Permalink Reply
jordanlev
Try using a different name for the field. The name "template" may be confusing concrete5. Try calling it something like "formTemplate".
fastcrash replied on at Permalink Reply
fastcrash
i change field name to 'blocktemplate', and now i am able to edit form and save it. but when i click Exit Edit Mode and Publish My Edits, it's throw this error
Fatal error: Call to a member function getInstance() on a non-object in C:\xampp\htdocs\www.concrete5.com\concrete\libraries\database_indexed_search.php on line 137


any sugest?

thanks a lot jordan.
jordanlev replied on at Permalink Reply
jordanlev
Hi,
I do not know what that problem is -- sorry!

You might have accidentally messed something else up along the way -- you might want to start over with a fresh copy of the Email List Signup block.
fastcrash replied on at Permalink Reply
fastcrash
yess, you are right.

i refresh my db before refresh schema btemailistsignup, and that very strange mysteriusv error is gone. after that i adding field as you sugest & working! thanks.

well litle by litle :)

i think this is will be my very impresive cms. :)
fastcrash replied on at Permalink Reply
fastcrash
yess, you are right.

i refresh my db before refresh schema btemailistsignup, and that very strange mysteriusv error is gone. after that i adding field as you sugest & working! thanks.

well litle by litle :)

i think this is will be my very impresive cms. :)

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.