-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for Unlimited Value Fields #178
Comments
…rupalgap_form_get_element_id() to append a delta value if one is provided as an argument. Changed _drupalgap_form_render_element() to fall back to using any hook_field_widget_form() implementations available. Changed drupalgap_field_info_instances_add_to_form() to start using a language code, still need to plug in delta value here.
…ement_id() to take in an optional language code and delta as arguments which are appended to the id. Changed drupalgap_form_state_values_assemble() and drupalgap_field_info_instances_add_to_form() to take into consideration language codes and delta values on field elements. Changed drupalgap_form_load() when iterating over elements, to generate the element's id and options attributes id.
…ccount the language code and delta values of the form state values when assembling the entity.
…eld_info_instance instead of doing it in _drupalgap_form_render_element(). They are still attached to the variables by _drupalgap_form_render_element() before sent off to the theme system though.
…elta values. Changed drupalgap_form_load() to check field cardinality and then append field item(s) by delta value onto the element's language code object.
…element item deltas and pass them along to hook_field_widget_form(). Added start to text_field_widget_form().
…if the element is a field, if it is a flat element, it converts it into a single item, so the iteration and themeing can be shared regardless of the type of element.
…le_get_element_value() using code extracted from drupalgap_form_state_values_assemble(). Changed drupalgap_form_state_values_assemble() to properly iterate over field delta values. Changed _drupalgap_form_render_element() to again run the element item(s) through the theme system after preprocessing the item based on its type. Changed drupalgap_entity_build_from_form_state() to properly iterate over field delta items. Temporarily commented out image_form_alter(). Changed drupalgap_node_assemble_data() to properly iterate over field item delta(s).
…ment_item_load() _drupalgap_form_add_another_item(), drupalgap_form_get_element_container_class(), drupalgap_form_element_item_create(), drupalgap_form_local_storage_save(), drupalgap_form_local_storage_load(), _drupalgap_form_render_element_item(), _drupalgap_form_element_items_widget_load(), _drupalgap_form_element_items_widget_arguments(). Changed drupalgap_form_load() to use drupalgap_form_element_item_create(). Changed drupalgap_form_load() to use drupalgap_form_local_storage_save(). Changed _drupalgap_form_render_element() to use _drupalgap_form_element_items_load() and _drupalgap_form_render_element_item(), it also places an 'add another item' button on unlimited value field elements. Changed _drupalgap_form_submit() to use drupalgap_form_local_storage_load().
…' even if there isn't a delta value present. Changed drupalgap_form_load() to properly initialize and merge field items, instead of overriding pre set items.
…utes. Changed _drupalgap_form_render_element() to make the call to hook_field_widget_form() when it is iterating over the items. Changed _drupalgap_form_render_element_item() to attach a default value to the variables before they are sent to the theme() layer. Changed drupalgap_field_info_instances_add_to_form() to iterate over each item in the field. Changed text_field_widget_form() to set the type on the items collection, since we no longer need to modify the form element items here, neat-o.
…_form_cancel_button(). Added drupalgap_form_element_get_module_name(). Changed _drupalgap_form_render_element() to choose a module to look to for the hook_field_widget_form() implementation on field elements and flat elements, migrated element preprocess modifications to their corresponding hook_field_widget_form() implementation, merged the element item values into theme's variables before sending to theme(), and set a default value onto theme's variables for form elements. Changed theme_radios() and theme_select() to ignore the attributes placed inside options. Changed drupalgap_field_info_instances_add_to_form() to change null default values to an empty string. Added options_field_widget_form() and image_field_widget_form(). Added a default cancel button to system settings forms.
This code has all been merged into the 7.x-1.x-alpha branch! |
Hi @signalpoint wih the last patch in services here the patch https://www.drupal.org/files/issues/multivalue_fields_fix-2224803-35.patch . Can working multivalues for register and edit nodes? thanks again |
@jomarocas Thank you for pointing this out, I've been anxiously waiting to try that patch, I'm glad to hear it works. It will still take some significant effort to support unlimited values in DrupalGap. Multi values should work fine, just not unlimited. |
@signalpoint Hi, is possible that i want a button to add more in drupal fields doesn't matter if unlimited or 4 or 9 fields but a button to tells add more, this functionaltiy exist? |
@jomarocas I started on a function to help with this But once I found out about the limitations in Services in regards to unlimited value fields, I ceased development on it. Plus throughout DrupalGap core, I automatically convert unlimited value fields to single value fields. But it sounds like we're finally getting close to resolving this in Services, at which point I'd be willing to work on this again in DrupalGap. |
I have enabled How do I add the complete div (with label, ...)? Should I use |
@luxio The rendering of the label is unfortunately buried within |
I have submitted a pull request (#824) |
This issue cannot be resolved until this Services issue is resolved: https://www.drupal.org/node/2224803
The text was updated successfully, but these errors were encountered: