Fieldtype

Archived
Forum
(read-only)

Nolan

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From iain

     

Channel Form

General

leadsuccess
leadsuccess

How do I go about inserting data into a nolan field from the front-end? I am inserting a simple list 1,2,3,4,5,6,7,8,9 and using text_input as the type in the nolan field.

Thanks!

leadsuccess
# 1
leadsuccess

Ok I tested this out and it seems to work for me.  I am looping over the text field to give me dynamically generated fields, so this worked great.

<input type"text" value="my_field_id[row_new_{row_count}][col_id_80][field_select][{nolan_row_count}]"

Is there another way or is this the right way?

iain
# 2
Developer
iain

Hi there

Yeah what you’ve got looks fine, might just want to check what you’re doing with matrix/grid as the row_new_ prefix you have will be wiping the old matrix rows and creating new ones every time you save the entry.

Not a big issue, and certainly not a problem if the front-end form is a oncer for saving a new entry only.

leadsuccess
# 3
leadsuccess

Ah cool! I do have an edit form and that is as follows…

<input type"text" value="my_field_id[row_id_{row_id}][col_id_80][field_select][{nolan_row_count}]"

It works good.

The most brutal part was having to re-capture all the fields and basically wipe the old record and insert a new record with the changes plus the old data.  I was hoping to simply be able to update one field and leave the rest of the data in place but it seems channel forms doesn’t play nice with Matrix when it comes to editing. That is not a Nolan thing though, seems it’s the way EE works it, unless I have totally missed the boat.

BTW, the plugin is totally a huge time saver, it have made me re-think much of how I interact with Matrix.

leadsuccess
# 4
leadsuccess

I do however wonder, is it possible to use channel forms, Nolan and multi-select dropdown together.  I have tried selecting multiple selections and still only one selection’s value gets created, I need multiple.  Is there anyway to successfully get this accomplished with a <select tag?

leadsuccess
# 5
leadsuccess

Nevermind, I just got it.  For anyone else who might need it.

<select id="select_multi" name="my_matrix[row_new_{row_count}][col_id_80][field_value][]" multiple

Had to take out the [{row_count}] at the end and replace it with []