Chrisj Posted May 26, 2016 Share Posted May 26, 2016 I'm using the phpMotion script and trying to add a 2nd "tag" field to the Upload Video Form. (The 'tag' field is for entering tags or search words, so the video can be found when searching). <li style="width:240px; text-align:right;"><strong>[var.lang_tags]:</strong></li> <li style="width:400px; text-align:left;"><input name="tags" type="text" class="upload-video-form-input" value="[var.tags]" size="38" /> </li> I copied and duplicated that code, like so: <li style="width:240px; text-align:right;"><strong>[var.lang_tags]:</strong></li> <li style="width:400px; text-align:left;"><input name="tags" type="text" class="upload-video-form-input" value="[var.tags]" size="38" /> </li> <li style="width:240px; text-align:right;"><strong>[var.lang_tags]2:</strong></li> <li style="width:400px; text-align:left;"><input name="tags" type="text" class="upload-video-form-input" value="[var.tags]" size="38" /> </li> But upon submitting the Form, Tags2: (the duplicated line) was required to proceed, not the original Tag field. Can you tell me what else I need to do to create a second (required) Tag field? Quote Link to comment https://forums.phpfreaks.com/topic/301266-trying-to-duplicate-a-form-field-without-success/ Share on other sites More sharing options...
ginerjm Posted May 26, 2016 Share Posted May 26, 2016 If you want multiple tags you have to use a different name attribute. If you name them all 'tags' you will only get one. Either alter the name or use the html array format for naming. Quote Link to comment https://forums.phpfreaks.com/topic/301266-trying-to-duplicate-a-form-field-without-success/#findComment-1533266 Share on other sites More sharing options...
Chrisj Posted May 26, 2016 Author Share Posted May 26, 2016 Thank you for your reply. I changed the duplicated lines to this: <li style="width:240px; text-align:right;"><strong>[var.lang_tags]2:</strong></li> <li style="width:400px; text-align:left;"><input name="tags2" type="text" class="upload-video-form-input" value="[var.tags]" size="38" /> Buy I can't find what is entered into Tags2 field when I search. The mysql has a column named 'tags', so do you think I'd be on the right track if I added a column named 'tags2' in that db, and then add 'tags2' to this line in the search.php file: $type_query_rows = 'indexer, video_id, title, title_seo, date_uploaded, user_id, video_length, approved, public_private, description, tags, number_of_views'; I look forward to any guidance.Much thanks Quote Link to comment https://forums.phpfreaks.com/topic/301266-trying-to-duplicate-a-form-field-without-success/#findComment-1533267 Share on other sites More sharing options...
ginerjm Posted May 26, 2016 Share Posted May 26, 2016 You need to learn how RDBMS really work and what proper table design is. NO - you don't add another column; you produce a second record. I could write for 10 minutes telling you more but it would behoove you better to spend a few hours reading and learning what I would attempt to tell you. Better you teach yourself some things before going further in this endeavor. Quote Link to comment https://forums.phpfreaks.com/topic/301266-trying-to-duplicate-a-form-field-without-success/#findComment-1533268 Share on other sites More sharing options...
Jacques1 Posted May 26, 2016 Share Posted May 26, 2016 What exactly is the point of having two tag lists for the same video? Quote Link to comment https://forums.phpfreaks.com/topic/301266-trying-to-duplicate-a-form-field-without-success/#findComment-1533269 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.