Can I define the default number of rows in a FFMatrix that I want to show? I want to allow a user to input into a SAEF on the front end that will populate a FFMatrix on the EE Control Panel end. Let's say I specify 3 body parts that the user must photograph and upload the image along with a description of each image.
The FFMatrix would be:
columns - body region | image | description
row 1 - hand | (blank until user inputs)
row 2 - foot | (blank until user inputs)
row 3 - nose | (blank until user inputs)
Help get this topic noticed by sharing it on
Twitter,
Facebook, or email.
Twitter,
Facebook, or email.
Can I define the default number of rows in a FFMatrix that I want to show?
Official
Response
-
Currently there's no setting for this. You'd have to hack ft.ff_matrix.php, changing this line:
$field_data = array(array());
to:
$field_data = array(array(), array()), array()));
-
Currently there's no setting for this. You'd have to hack ft.ff_matrix.php, changing this line:
$field_data = array(array());
to:
$field_data = array(array(), array()), array())); -
-
Thanks for the quick reply Brandon. Would this affect all of my FFMatrix usage? For example in one instance, I want to require 3 rows, but another I may want 10 rows.
-
-
-
-
-
-
I want to do this as well - is this still the recommended way to have multiple rows showing in a SAEF to start (just asking because this is 8 months old and things can change).
Thanks, -
-
As of Matrix 2.0.8, you could just do it via Javascript:
$(document).ready(function(){
var m = Matrix.instances[0];
m.addRow();
m.addRow();
});
-
-
-
Loading Profile...



EMPLOYEE


