Adding a custom field, almost there!
Permalink Browser Info Environment
In the database I've added an extra column called "documentArtikel".
Added this one in, form_setup, addDocument and docsBuilder.
In controller I changed the following 4 lines:
But now when I enter a value for this custom field, its starts populating the first item with ID 1 and so on. What should I change so the value will will be added to the newly added corresponding ID?
Added this one in, form_setup, addDocument and docsBuilder.
In controller I changed the following 4 lines:
$sql = "insert into formigoDocumentsManagerDocuments (documentBlockID, documentTitle, documentArtikel, documentDescription, documentThumbnail, documentFile, documentOrder, documentActive) values (?, ?, ?, ?, ?, ?, ?, ?);"; $db->execute($sql,array($curBlockID,$args['title-'.$i],$args['documentArtikel-'.$i],$args['description-'.$i],$args['thumbnailFile-'.$i], $args['documentFile-'.$i],$args['documentOrder-'.$i],$args['documentActive-'.$i])); $sql = "insert into formigoDocumentsManagerDocuments (documentBlockID, documentTitle, documentArtikel, documentDescription, documentThumbnail, documentFile, documentOrder, documentActive) " . "select ?, documentTitle, documentArtikel, documentDescription, documentThumbnail, documentFile, documentOrder, documentActive FROM formigoDocumentsManagerDocuments WHERE documentBlockID = ?";
But now when I enter a value for this custom field, its starts populating the first item with ID 1 and so on. What should I change so the value will will be added to the newly added corresponding ID?
Type: | Discussion |
---|---|
Status: | New |