Log message #4205039

# At Username Text
# Sep 21st 2019, 09:03 destinydriven same difference
# Sep 21st 2019, 09:02 destinydriven yes
# Sep 21st 2019, 09:02 adam282 Oh, well no cause you said it works without form builder
# Sep 21st 2019, 09:02 adam282 It might not be Cake interpreting it but PHP
# Sep 21st 2019, 09:01 adam282 Try `echo $this->Form->hidden("DailyHour.{$i}.employee_id", ['value' => $key, 'id' => false]);`
# Sep 21st 2019, 09:00 destinydriven yes, exactly
# Sep 21st 2019, 09:00 adam282 CakePHP is interpreting `<%= key %>` instead of showing that exactly
# Sep 21st 2019, 09:00 adam282 Oh, I see what you’re saying.
# Sep 21st 2019, 08:59 destinydriven echo “<input name=‘data[DailyHour][{$i}][employee_id]’ class=‘form-control’ value=‘{$key}’ type=‘hidden’>“; works just fine
# Sep 21st 2019, 08:59 destinydriven I can get it to work by not using FormHelper though. Was just wondering
# Sep 21st 2019, 08:59 adam282 Looks like a wanna jQuery
# Sep 21st 2019, 08:59 destinydriven thanks for the attempt :)
# Sep 21st 2019, 08:58 adam282 Hm, never worked with it. Sorry.
# Sep 21st 2019, 08:58 adam282 I would do `<?php echo $key; ?>`
# Sep 21st 2019, 08:58 destinydriven Elasty, its a template variable from underscore js
# Sep 21st 2019, 08:58 adam282 I don’t use short open tags
# Sep 21st 2019, 08:58 adam282 Or something like that.
# Sep 21st 2019, 08:58 adam282 Should be `<?php= $key ?>`
# Sep 21st 2019, 08:58 destinydriven yeah, view source has <%= key %>
# Sep 21st 2019, 08:58 adam282 That’s because you’re missing `$` if it’s a variable
# Sep 21st 2019, 08:57 adam282 Um, view the source and you should see a hidden field
# Sep 21st 2019, 08:57 destinydriven its returning <%= key %> instead of the value
# Sep 21st 2019, 08:57 adam282 What do you mean by properly process?
# Sep 21st 2019, 08:56 destinydriven In Cake2 is there any way to get FormHelper is properly process a template variable like $key : ‘<%= key %>’; echo $this->Form->hidden(“DailyHour.{$i}.employee_id”, [‘value’ => “{$key}“, ‘id’ => false]);
# Sep 21st 2019, 08:46 adam282 Oh, and one Authors Controller, if needed.
# Sep 21st 2019, 08:46 adam282 One Authors table, one Authors model, one Author Entity…
# Sep 21st 2019, 08:46 adam282 Then why would you need a prefix?
# Sep 21st 2019, 08:45 jotpe For now, they don't.
# Sep 21st 2019, 08:42 adam282 Hm, do the other plugins contain the same tables? If so, you really should rethink your structure.
# Sep 21st 2019, 08:41 jotpe I guess I'll just change the setTable() in my Model.
# Sep 21st 2019, 08:40 jotpe I mean: In my db it could get messy if I have authors, speakers etc. and this is just for one plugin (I have 20 more to migrate). Would be good to have db tables like cfp_authors but in my Application have just a Authors Model.
# Sep 21st 2019, 08:37 adam282 Well, a table prefix would apply to the entire app and all tables.
# Sep 21st 2019, 08:36 jotpe Is there something like a table prefix? Since I have a lots of models I want to group them to the corresponding plugin.
# Sep 21st 2019, 08:25 adam282 You’re very welcome
# Sep 21st 2019, 08:24 jotpe This was lots of help :slightly_smiling_face:
# Sep 21st 2019, 08:24 jotpe Okay, thanks so much :slightly_smiling_face:
# Sep 21st 2019, 08:23 adam282 Well, I am out of suggestions then. Sorry bud
# Sep 21st 2019, 08:23 adam282 Oh, I see.
# Sep 21st 2019, 08:22 jotpe I guess it's a bit of a requirement to readd them. I can't expose a list of authors, since this will be publicly available. Also people should have different organizations, not just one. Also the db data is truncated once a year.
# Sep 21st 2019, 08:20 adam282 On the add talk page, provide a drop down of the current people (you can have three different lists if need be) and next to it put a plus button. Let the user choose the person from the list and click the button to actually add that user to the talk (maybe by way of AJAX?). Then, put another button that opens a modal window to add someone not already in the database.
# Sep 21st 2019, 08:19 jotpe comments will be users, so in this case saving the Authors didn't work